decide where transit info is loaded from based on install method

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

View File

@ -352,8 +352,13 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin):
def set_sign_values(self): def set_sign_values(self):
"""add the last commit of the plugins class file into plugins context""" """add the last commit of the plugins class file into plugins context"""
# fetch git log if self.is_package:
commit = self.get_plugin_commit() # is a package - no signing - no commit
commit = {}
else:
# fetch git log
commit = self.get_plugin_commit()
# resolve state # resolve state
sign_state = getattr(GitStatus, commit['verified'], GitStatus.N) sign_state = getattr(GitStatus, commit['verified'], GitStatus.N)