Ticket #2316: generic_patch.2.diff
File generic_patch.2.diff, 594 bytes (added by , 18 years ago) |
---|
-
generic.py
243 243 return obj 244 244 create.alters_data = True 245 245 246 def get_or_create(self, **kwargs): 247 kwargs[self.content_type_field_name] = self.content_type 248 kwargs[self.object_id_field_name] = self.pk_val 249 return self.get_query_set().get_or_create(**kwargs) 250 get_or_create.alters_data = True 251 246 252 return GenericRelatedObjectManager 247 253 248 254 class GenericRel(ManyToManyRel):