mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 11:48:33 +08:00
Careful when self.state is None.
This commit is contained in:
@@ -261,7 +261,7 @@ class ComponentBuild(Base):
|
||||
# Koji is py2 only, so this fails if the main web process is
|
||||
# running on py3.
|
||||
import koji
|
||||
retval['state_name'] = koji.BUILD_STATES[self.state]
|
||||
retval['state_name'] = koji.BUILD_STATES.get(self.state)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user