Update lock managet app

Add keyword arguments. Sort imports. Move settings and test
literals to their own module.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-01-21 02:50:34 -04:00
parent 027a853885
commit 09edab5027
11 changed files with 43 additions and 28 deletions

View File

@@ -38,7 +38,7 @@ class Lock(models.Model):
"""
try:
lock = Lock.objects.get(
name=self.name, creation_datetime=self.creation_datetime
creation_datetime=self.creation_datetime, name=self.name
)
except Lock.DoesNotExist:
# Our lock has expired and was reassigned