File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ def get_instance(self):
217217 ('~' , 'Changed' ),
218218 ('-' , 'Deleted' ),
219219 )),
220- 'history_object' : HistoricalObjectDescriptor (model ),
220+ 'history_object' : HistoricalObjectDescriptor (model , self . fields_included ( model ) ),
221221 'instance' : property (get_instance ),
222222 'instance_type' : model ,
223223 'revert_url' : revert_url ,
@@ -311,10 +311,11 @@ def convert_auto_field(field):
311311
312312
313313class HistoricalObjectDescriptor (object ):
314- def __init__ (self , model ):
314+ def __init__ (self , model , fields_included ):
315315 self .model = model
316+ self .fields_included = fields_included
316317
317318 def __get__ (self , instance , owner ):
318319 values = (getattr (instance , f .attname )
319- for f in self .model . _meta . fields )
320+ for f in self .fields_included )
320321 return self .model (* values )
You can’t perform that action at this time.
0 commit comments