Ticket #6702: newforms_models_assert_isinstance.diff
File newforms_models_assert_isinstance.diff, 635 bytes (added by , 17 years ago) |
---|
-
django/newforms/models.py
250 250 self.instance = opts.model() 251 251 object_data = {} 252 252 else: 253 assert isinstance(instance, opts.model), 'instance (%r) must be an instance of %r' % ( 254 instance, opts.model) 253 255 self.instance = instance 254 256 object_data = model_to_dict(instance, opts.fields, opts.exclude) 255 257 # if initial was provided, it should override the values from instance