Revision 6e4e100b snf-quotaholder-app/quotaholder_django/quotaholder_app/callpoint.py

b/snf-quotaholder-app/quotaholder_django/quotaholder_app/callpoint.py
750 750
                                           current=current,
751 751
                                           limit=limit)
752 752

  
753
                current = (+ th.importing + th.returning
753
                limit = tp.quantity + tp.capacity
754
                current = (+ th.importing + th.returning + tp.quantity
754 755
                           - th.exported - th.released)
755 756

  
756
                if current + quantity > tp.quantity + tp.capacity:
757
                if current + quantity > limit:
757 758
                    m = ("There is not enough capacity "
758 759
                         "to allocate into in %s.%s" % (target, resource))
759 760
                    raise NoCapacityError(m,

Also available in: Unified diff