wilsonmcdade / tunnelvision

Source code for Tunnelvision: RIT's Overlooked Art Museum
https://tunnelvision.csh.rit.edu
5 stars 4 forks source link

It crashes when adding a new mural #22

Open MoralCode opened 2 weeks ago

MoralCode commented 2 weeks ago

its interpreting the year as null when I create a new mural with the year 0000, this is causing database exceptions

While i admit some fault for giving it an invalid year, maybe it shouldnt just crash?

MoralCode commented 2 weeks ago

welp i read the stack trace and that isnt what caused it

seems like active is defaulting to None?

sqlalchemy.exc.IntegrityError: (psycopg2.errors.NotNullViolation) null value in column "active" of relation "murals" violates not-null constraint
DETAIL:  Failing row contains (2, SAU Main Entrance (Outdoor button), t, When entering the SAU from the main quarter mile entrance, its t..., 1, 04, null, null, null).

[SQL: INSERT INTO murals (title, artistknown, notes, year, location, nextmuralid, active, spotify) VALUES (%(title)s, %(artistknown)s, %(notes)s, %(year)s, %(location)s, %(nextmuralid)s, %(active)s, %(spotify)s) RETURNING murals.id]
[parameters: {'title': 'SAU Main Entrance (Outdoor button)', 'artistknown': True, 'notes': 'When entering the SAU from the main quarter mile entrance, its the button for the first (exterior) set of doors', 'year': '0001', 'location': '04', 'nextmuralid': None, 'active': None, 'spotify': None}]
(Background on this error at: https://sqlalche.me/e/20/gkpj)
MoralCode commented 2 weeks ago

seems like the same is true for the spotify field too (what the heck is that for?!)

wilsonmcdade commented 2 weeks ago

Yes there's some issues with mural uploads. Hoping to address that in #21

I'll do some testing and see what the issue is that you're having

wilsonmcdade commented 2 weeks ago

seems like the same is true for the spotify field too (what the heck is that for?!)

Some pieces are directly related to popular music from that time: https://tunnelvision.csh.rit.edu/murals/211 https://tunnelvision.csh.rit.edu/murals/62