Careful when self.state is None.

This commit is contained in:
Ralph Bean
2016-07-21 10:31:36 -04:00
parent 747f5a3514
commit 5b06b64833

View File

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