Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, db_types=None, **kwargs):
self.db_types = db_types or {}
super_patchy(*args, **kwargs)
def clone(self):
# Clone db_types state as well
new_state = super_patchy()
new_state.db_types = self.db_types.copy()
if 'apps' in self.__dict__: # hasattr would cache the property
new_state.apps.db_types = self.apps.db_types.copy()
return new_state
def generate_created_models(self, *args, **kwargs):
super_patchy(*args, **kwargs)
self.detect_enums()