Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django check if related object is None

def has_related_object(self):
    return hasattr(self, 'customers') and self.car is not None
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #check #related #object #None
ADD COMMENT
Topic
Name
8+7 =