Commit 0811a4b6 authored by Michal Čihař's avatar Michal Čihař

Do not use request if we do not have it

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 59454bd5
......@@ -556,7 +556,10 @@ class Unit(models.Model, LoggerMixin):
user = request.user
# Update lock timestamp
self.translation.update_lock(request.user)
if request is not None:
self.translation.update_lock(request.user)
else:
self.translation.update_lock(user)
# Store to backend
try:
......
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