backend/utils.py
def find_element_or_none(self, model, identifier):
        """
        This function will try to get the element in the database by it's id, based on the model that is passed in the 'model'
        param. Returns None if it doesn't find any.
        """
        try:
            element = model.objects.get(pk=int(identifier))
        except Exception:
            return None
        else:
            return element

        This function will try to get the element in the database by it's id, based on the model that is passed in the 'model'
        param. Returns None if it doesn't find any.
        
This function will try to get the element in the database by it's id, based on the model that is passed in the 'model'
param. Returns None if it doesn't find any.
This function will try to get the element in the database by it ' s id based on the model that is passed in the ' model ' param . Returns None if it doesn ' t find any .
def find_element_or_none(self, model, identifier):
        try:
            element = model.objects.get(pk=int(identifier))
        except Exception:
            return None
        else:
            return element
def find_element_or_none ( self , model , identifier ) : try : element = model . objects . get ( pk = int ( identifier ) ) except Exception : return None else : return element
This function will try to get the element in the database by it's id, based on the model that is passed in the 'model'
param.
This function will try to get the element in the database by it ' s id based on the model that is passed in the ' model ' param .
"""
        This function will try to get the element in the database by it's id, based on the model that is passed in the 'model'
        param. Returns None if it doesn't find any.
        """
self
model
identifier