Allow for unknown/missing "changed by" user for product price history

This commit is contained in:
Lance Edgar 2020-08-20 17:51:59 -05:00
parent 374f20ff1a
commit 7a01cb8873

View file

@ -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