return (self.totais() or 0) - (self.baixado() or 0)

Geat!

Thank's

Em dom, 7 de abr de 2019 às 21:29, 'Vinod Kumar' via Django users <
[email protected]> escreveu:

> Hi
> It error generate from model string represention where you are trying to
> add two other relationship model key those don't have any object.
>
> Please let me know if you have any other questions.
> Or share with me model structure.
>
> I'm happy to help you.
>
> On Mon, Apr 8, 2019, 5:45 AM Elias Coutinho <[email protected]>
> wrote:
>
>> Save some people.
>>
>> Friends lack sufficient knowledge to try to solve this problem alone.
>>
>> I have these 3 classes below:
>>
>> Historical
>> <https://github.com/CoutinhoElias/pesquisasatisfacao/blob/master/pesquisasatisfacao/financeiro/models.py#L15-L43>,
>> Account
>> <https://github.com/CoutinhoElias/pesquisasatisfacao/blob/master/pesquisasatisfacao/financeiro/models.py#L46-L72>,
>> Payment
>> <https://github.com/CoutinhoElias/pesquisasatisfacao/blob/master/pesquisasatisfacao/financeiro/models.py#L75-L85>
>>
>> In the admin I can list in the History the added values of Account and
>> Payment as well so I will search in the respective models, however I think
>> it is interesting to also present a column with the remaining value, that
>> is, Account - Payment (Clustered value of accounts subtracted from the
>> payment) .
>>
>> I thought it would be easy to do but it returns me the following error:
>>
>> unsupported operand type (s) for -: 'NoneType' and 'NoneType'
>>
>> I know it means the message but I do not know how to solve it.
>>
>> Has anyone ever experienced this? Can you help me?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d3190fd9-0fdf-4e1d-9f3d-6a0120662b3e%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/d3190fd9-0fdf-4e1d-9f3d-6a0120662b3e%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> ************************************************************************
>
> *This e-mail and all attachments are intended solely for use by the
> intended recipient and may contain confidential / proprietary information
> of KiwiTech, LLC, subject to important disclaimers and conditions including
> restrictions on the use, disclosure, transfer or export of such
> information.* *If you have received this message in error or are not the
> named recipient(s), please immediately notify the sender at the telephone
> number stated above or by reply e-mail and delete this e-mail from your
> computer*
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/ZF9sj04neCQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJOHC1y6PAWRJBmGqk7%3DZFbDrFFZJaqgAvEwZdxm5x5T%3DAq-TQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJOHC1y6PAWRJBmGqk7%3DZFbDrFFZJaqgAvEwZdxm5x5T%3DAq-TQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Elias Coutinho.
Aprender sobre alguns assuntos é fundamental.
Aprender sobre Deus é indiscutivelmente o melhor conteúdo.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALgom8oxkTiUiF%3DtmzGmZDfqbYcRSNvCoZgkZd0BDwhBCCTRFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to