def do_weight_matrix(self): for o in RentList.get_priority1(): w = RentAllocationMatrix.calculate_weight(o) debug('Allocation weight for %s - %s %s (%s): %s (old: %s)', o.id, o.item, o.item.category, o.user, w, o.weight) if w != o.weight: o.weight = w o.save()