diff options
-rw-r--r-- | Post/models.py | 2 | ||||
-rw-r--r-- | Post/parser.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Post/models.py b/Post/models.py index 0159765..6ea38ef 100644 --- a/Post/models.py +++ b/Post/models.py @@ -45,7 +45,7 @@ class Build(models.Model): default=ErrorType.RECIPE) def save(self, *args, **kwargs): - if self.ERROR_TYPE not in [e_type[0] for e_type in self.ERROR_TYPES]: + if self.ERROR_TYPE not in [e_type[0] for e_type in self.ERROR_TYPE_CHOICES]: raise InvalidErrorType("Error type %s is not known" % self.ERROR_TYPE) diff --git a/Post/parser.py b/Post/parser.py index 51886a1..dcf4f6b 100644 --- a/Post/parser.py +++ b/Post/parser.py @@ -53,7 +53,7 @@ class Parser: b.EMAIL = str(jsondata['email']) b.LINK_BACK = jsondata.get("link_back", None) - error_type = jsondata.get("error_type", ErrorType.RECIPE) + b.ERROR_TYPE = jsondata.get("error_type", ErrorType.RECIPE) # Extract the branch and commit g = re.match(r'(.*): (.*)', jsondata['branch_commit']) |