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

Do not store change object for not yet saved subproject

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent f6444bef
......@@ -828,6 +828,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
'%s remote into repo',
self.merge_style,
)
if self.id:
Change.objects.create(
subproject=self,
user=request.user if request else None,
......@@ -849,6 +850,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
# Reset repo back
method(abort=True)
if self.id:
Change.objects.create(
subproject=self,
user=request.user if request else 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