From: Tom Hunger Date: Tue, 3 Feb 2015 16:37:46 +0000 (+0000) Subject: Allow the same user claiming the same claim code twice. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=5559676b75f01b01547073580a005d6bbf51b4a4;p=sirius.git Allow the same user claiming the same claim code twice. --- diff --git a/sirius/models/user.py b/sirius/models/user.py index 9c9ee5e..d3a39cb 100644 --- a/sirius/models/user.py +++ b/sirius/models/user.py @@ -72,7 +72,7 @@ class User(db.Model): if printer is None: return - if printer.owner is not None: + if printer.owner is not None and printer.owner != self: raise CannotChangeOwner( "Printer {} already owned by {}. Cannot claim for {}.".format( printer, printer.owner, self))