Commit a2af18ff authored by Michal Čihař's avatar Michal Čihař

Log parse errors in changes

Fixes #862
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 3f045e9f
......@@ -160,6 +160,7 @@ class Change(models.Model):
ACTION_REBASE = 21
ACTION_FAILED_MERGE = 22
ACTION_FAILED_REBASE = 23
ACTION_PARSE_ERROR = 24
ACTION_CHOICES = (
(ACTION_UPDATE, ugettext_lazy('Resource update')),
......@@ -186,6 +187,7 @@ class Change(models.Model):
(ACTION_REBASE, ugettext_lazy('Rebased repository')),
(ACTION_FAILED_MERGE, ugettext_lazy('Failed merge on repository')),
(ACTION_FAILED_REBASE, ugettext_lazy('Failed rebase on repository')),
(ACTION_PARSE_ERROR, ugettext_lazy('Parse error')),
)
ACTIONS_SUBPROJECT = set((
......
......@@ -854,6 +854,11 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
translation,
str(error)
)
Change.objects.create(
subproject=self,
translation=translation,
action=Change.ACTION_PARSE_ERROR,
)
raise ParseError(str(error))
def update_branch(self, request=None, method=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment