def acquire(self, *args, **kwargs):
        """
        Really acquire the lock only if it's not a sub-lock. Then save the
        sub-lock status.
        """
        if not self.field.lockable:
            return
        if self.already_locked_by_model:
            self.sub_lock_mode = True
            return
        self.already_locked_by_model = True
        super(FieldLock, self).acquire(*args, **kwargs)
def acquire ( self , * args , ** kwargs ) : if not self . field . lockable : return if self . already_locked_by_model : self . sub_lock_mode = True return self . already_locked_by_model = True super ( FieldLock , self ) . acquire ( * args , ** kwargs )
Really acquire the lock only if it's not a sub-lock. Then save the
        sub-lock status.