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):
# Reset repo back
method(abort=True)
if self.id:
Change.objects.create(
subproject=self,
user=request.user if request else None,
action=action_failed,
target=str(error),
)
if self.id:
Change.objects.create(
subproject=self,
user=request.user if request else None,
action=action_failed,
target=error,
)
# Notify subscribers and admins
self.notify_merge_failure(error, status)
# Notify subscribers and admins
self.notify_merge_failure(error, status)
# Tell user (if there is any)
if request is not None:
messages.error(
request,
error_msg % force_text(self)
)
# Tell user (if there is any)
if request is not None:
messages.error(
request,
error_msg % force_text(self)
)
return False
return False
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