Commit 09e4c924 authored by Michal Čihař's avatar Michal Čihař

Do not generate Change on unsaved object

Fixes #1005
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 90fc3940
...@@ -854,11 +854,12 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin): ...@@ -854,11 +854,12 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
translation, translation,
str(error) str(error)
) )
Change.objects.create( if self.id:
subproject=self, Change.objects.create(
translation=translation, subproject=self,
action=Change.ACTION_PARSE_ERROR, translation=translation,
) action=Change.ACTION_PARSE_ERROR,
)
raise ParseError(str(error)) raise ParseError(str(error))
def update_branch(self, request=None, method=None): 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