• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How can I add to my investment balance with django

Resolved: How can I add to my investment balance with django

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

With the code below, I’m attempting to add the amount to my current balance but I am getting a ‘QuerySet’ object has no attribute ‘balance’

Answer:

Right now you are trying to add a balance to your whole query string. If there is only one user investment, the. You could do
user_investment = Investment.objects.all()[0]
Otherwise you need to use .get() and pull the user_investment that you are looking for, maybe
user_investment = Investment.objects.get(user=user)

If you have better answer, please add a comment about this, thank you!

django-forms django-models python-3.x
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: significance letter above bar graphic in wrong order

01/04/2023

Resolved: VBA – Applying border around the areas with value/text

01/04/2023

Resolved: How can I implement a function depending on picked up items?

01/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.