@@ -202,7 +202,8 @@ def get_instance(self):
202202 return {
203203 'history_id' : models .AutoField (primary_key = True ),
204204 'history_date' : models .DateTimeField (),
205- 'history_change_reason' : models .CharField (max_length = 100 , null = True ),
205+ 'history_change_reason' : models .CharField (max_length = 100 ,
206+ null = True ),
206207 'history_user' : models .ForeignKey (
207208 user_model , null = True , related_name = self .user_related_name ,
208209 on_delete = models .SET_NULL ),
@@ -254,7 +255,8 @@ def create_historical_record(self, instance, history_type):
254255 for field in instance ._meta .fields :
255256 attrs [field .attname ] = getattr (instance , field .attname )
256257 manager .create (history_date = history_date , history_type = history_type ,
257- history_user = history_user , history_change_reason = history_change_reason , ** attrs )
258+ history_user = history_user ,
259+ history_change_reason = history_change_reason , ** attrs )
258260
259261 def get_history_user (self , instance ):
260262 """Get the modifying user from instance or middleware."""
0 commit comments