Removed commented code

This commit is contained in:
Tom Roussel 2024-03-02 12:52:49 +01:00
parent 9694a65f0e
commit e0068ed6e6
2 changed files with 0 additions and 10 deletions

View file

@ -33,6 +33,3 @@ restful_api.add_resource(BillsHandler, "/projects/<string:project_id>/bills")
restful_api.add_resource( restful_api.add_resource(
BillHandler, "/projects/<string:project_id>/bills/<int:bill_id>" BillHandler, "/projects/<string:project_id>/bills/<int:bill_id>"
) )
# restful_api.add_resource(
# ProjectHandler, "/<project_id>/settle/<amount>/<ower>/<payer>"
# )

View file

@ -120,13 +120,6 @@ class Project(db.Model):
balance spent paid balance spent paid
""" """
balances, should_pay, should_receive = (defaultdict(int) for time in (1, 2, 3)) balances, should_pay, should_receive = (defaultdict(int) for time in (1, 2, 3))
# for bill in self.get_bills_unordered().all():
# should_receive[bill.payer.id] += bill.converted_amount
# total_weight = sum(ower.weight for ower in bill.owers)
# for ower in bill.owers:
# should_pay[ower.id] += (
# ower.weight * bill.converted_amount / total_weight
# )
for bill in self.get_bills_unordered().all(): for bill in self.get_bills_unordered().all():
total_weight = sum(ower.weight for ower in bill.owers) total_weight = sum(ower.weight for ower in bill.owers)