fix commit references

This commit is contained in:
Matthias 2021-11-04 12:49:19 +01:00
parent e654ba786f
commit cb30188623
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -360,15 +360,15 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
commit = self.get_plugin_commit()
# resolve state
sign_state = getattr(GitStatus, commit['verified'], GitStatus.N)
sign_state = getattr(GitStatus, str(commit.get('verified')), GitStatus.N)
# set variables
self.commit = commit
self.sign_state = sign_state
# process date
if self.commit['date']:
self.commit['date'] = datetime.fromisoformat(self.commit['date'])
if self.commit.get('date'):
self.commit['date'] = datetime.fromisoformat(self.commit.get('date'))
if sign_state.status == 0:
self.sign_color = 'success'