Revision ea818d33

b/snf-quotaholder-app/quotaholder_django/quotaholder_app/callpoint.py
702 702
                th = db_get_holding(entity=target, resource=resource,
703 703
                                    for_update=True)
704 704
            except Holding.DoesNotExist:
705
                m = ("There is not enough capacity "
705
                m = ("There is no capacity "
706 706
                     "to allocate into in %s.%s" % (target, resource))
707 707
                raise NoCapacityError(m,
708 708
                                      source=entity, target=target,
......
724 724
            current = (+ th.importing + th.returning
725 725
                       - th.exported - th.released)
726 726

  
727
            if current + quantity > limit:
727
            if not release and (current + quantity > limit):
728 728
                    m = ("There is not enough capacity "
729 729
                         "to allocate into in %s.%s" % (target, resource))
730 730
                    raise NoCapacityError(m,

Also available in: Unified diff