louking / contracts

1 stars 2 forks source link

Trend error on staging sponsorship (send agreement) #436

Closed hhlanglois closed 1 year ago

hhlanglois commented 1 year ago

I just did "Send Agreement" for a WDF sponsorship (Anderabi Management). It seems to have sent the agreement, but I got the following error:

Traceback (most recent call last):
  File "/var/www/[www.contracts.loutilities.com/venv/lib/python3.9/site-packages/loutilities/tables.py](http://www.contracts.loutilities.com/venv/lib/python3.9/site-packages/loutilities/tables.py)", line 733, in wrapped_f
    self.editor_method_posthook(request.form)
  File "/var/www/[www.contracts.loutilities.com/contracts/contracts/contracts/views/admin/sponsorcontract.py](http://www.contracts.loutilities.com/contracts/contracts/contracts/views/admin/sponsorcontract.py)", line 230, in editor_method_posthook
    calculateTrend(thesesponsorships)
  File "/var/www/[www.contracts.loutilities.com/contracts/contracts/contracts/trends.py](http://www.contracts.loutilities.com/contracts/contracts/contracts/trends.py)", line 36, in calculateTrend
    thisyear = int(thisyearsships[0].raceyear)
IndexError: list index out of range
louking commented 1 year ago

This looks like a test escape but I'm not sure of the case I missed.

Was the sponsorship was created first as tentative, then opened for Send Agreement?

If agreement was sent, I think it's safe to manually change the sponsorship state to committed

hhlanglois commented 1 year ago

The sponsorship was originally in the renewed-pending stage. I staged the sponsorship to tentative when I sent the solicitation. When the sponsor responded via email, I filled in a few more fields and hit the "send agreement" button.

I manually set the state to committed, but it doesn't show up in the weekly summary table. The total should be $9,500 and it still shows $8,000. And there is no longer a 2023 trend line (it's actually 0 and I just can't see it). It use to say $8,000.

On Tue, Jan 17, 2023 at 6:52 AM Lou King @.***> wrote:

This looks like a test escape but I'm not sure of the case I missed.

Was the sponsorship was created first as tentative, then opened for Send Agreement?

If agreement was sent, I think it's safe to manually change the sponsorship state to committed

— Reply to this email directly, view it on GitHub https://github.com/louking/contracts/issues/436#issuecomment-1385309297, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW5PCAILAR7UM6N6WR23ZDWS2BWHANCNFSM6AAAAAAT5XMGS4 . You are receiving this because you authored the thread.Message ID: @.***>

louking commented 1 year ago

this has been deployed to production, as version 2.2.4