def lotte_done_handler(sender, request, resources=None, language=None,
    **kwargs):
    user = request.user
    logger.debug("lock-addon: Finished editing in Lotte")
    for resource in resources:
        lock = Lock.objects.get_valid(resource, language)
        if lock:
            try:
                lock.delete_by_user(user)
                logger.debug("lock-addon: Lock deleted: '%s'" % lock)
            except LockError, e:
                logger.debug("lock-addon: User '%s' sent translations to a "
                    "resource/language locked by someone else: %s" %
                    (user, e.message))
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/addons/locks/handlers.py/lotte_done_handler/original