def get_one(self, id):
    '\n            Return a single model instance by its ID\n\n            :param id:\n                Model ID\n        '
    try:
        return self.get_query().filter(pk=id).first()
    except mongoengine.ValidationError as ex:
        flash(gettext('Failed to get model. %(error)s', error=format_error(ex)), 'error')
        return None
Return a single model instance by its ID

:param id:
    Model ID
def get_one(self, id):
    '\n            Return a single model instance by its ID\n\n            :param id:\n                Model ID\n        '
    try:
        return self.get_query().filter(pk=id).first()
    except mongoengine.ValidationError as ex:
        flash(gettext('Failed to get model. %(error)s', error=format_error(ex)), 'error')
        return None