Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recalculating bill deletes EventLineItems but doesn't add them back #395

Open
tnightingale opened this issue Apr 17, 2018 · 1 comment
Open
Assignees

Comments

@tnightingale
Copy link
Contributor

Is this intentional?

# Delete all the line items
for line_item in self.line_items.all():
    line_item.delete()

# Add everything back
for s in subscriptions:
    self.add_subscription(s)
for d in coworking_days:
    self.add_coworking_day(d)
# !!! What about events??
for c in custom_items:
    c.save()

https://github.com/nadineproject/nadine/blob/master/nadine/models/billing.py#L628-L638

@tnightingale
Copy link
Contributor Author

Oh, it looks like the event I was testing with got bumped onto another bill, might be because I have been messing around with the data and it's in an invalid state. Will need to investigate further.

However the code snippet above still seems like it should address EventLineItems along with the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants