Commit 1ecb254c authored by Michal Čihař's avatar Michal Čihař

Correclty nest code

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 4d2b85c1
...@@ -975,25 +975,25 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin): ...@@ -975,25 +975,25 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
# Reset repo back # Reset repo back
method(abort=True) method(abort=True)
if self.id: if self.id:
Change.objects.create( Change.objects.create(
subproject=self, subproject=self,
user=request.user if request else None, user=request.user if request else None,
action=action_failed, action=action_failed,
target=str(error), target=error,
) )
# Notify subscribers and admins # Notify subscribers and admins
self.notify_merge_failure(error, status) self.notify_merge_failure(error, status)
# Tell user (if there is any) # Tell user (if there is any)
if request is not None: if request is not None:
messages.error( messages.error(
request, request,
error_msg % force_text(self) error_msg % force_text(self)
) )
return False return False
def get_mask_matches(self): def get_mask_matches(self):
''' '''
......
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