def make_etag(model):
    """ Generate a string to use as an etag """
    try:
        return f"{model.id}-{model.editDetails['date']}"
    except AttributeError:
        # this should be a dictionary...
        return f"{model['_id']}-{model['editDetails']['date']}"