Allow for unknown/missing "changed by" user for product price history
This commit is contained in:
parent
374f20ff1a
commit
7a01cb8873
|
@ -1004,8 +1004,8 @@ class ProductsView(MasterView):
|
|||
history['changed'] = six.text_type(changed)
|
||||
history['changed_display_html'] = raw_datetime(self.rattail_config, changed)
|
||||
user = history.pop('changed_by')
|
||||
history['changed_by_uuid'] = user.uuid
|
||||
history['changed_by_display'] = six.text_type(user)
|
||||
history['changed_by_uuid'] = user.uuid if user else None
|
||||
history['changed_by_display'] = six.text_type(user or "??")
|
||||
jsdata.append(history)
|
||||
return jsdata
|
||||
|
||||
|
|
Loading…
Reference in a new issue