upenndigitalscholarship / deep

MIT License
3 stars 1 forks source link

Bug: "null" and "n/a" automated displays not working right #192

Closed ZacharyLesser closed 6 months ago

ZacharyLesser commented 6 months ago

There's a bunch of code that tells the system to display "n/a" when there is nothing in a Display field such as Date of First Production (Brit Drama) Display. This seems not to be working right anymore. It was working but something has broken it.

If you search for Title = Fulgens and look at 1&2 Fulgens and Lucrece, you'll see "null" appearing in a couple places wrongly.

It may be best for us to fix this all in the data. Just adding exactly what we want to display to the Display fields. Can you remove all the code that automates what to display in case of no data in those fields? Might be good just to have the data stabilized on this front rather than relying on the code.

abfarmer109 commented 6 months ago

Adding to Zack's comments... The field "Date of First Production (BritDrama)" sometimes has "null" in the results and other times it has a blank. A blank field seems to occur when "nan" is in the Admin field "Date of First Production (BritDrama)." In contrast, "null" seems to appear when that Admin field is blank.

A similar problem is affecting the field "Genre (Annals)." Right now, "null" appears for all collections because nothing is in the field. But the records should display "n/a."

apjanco commented 6 months ago

These fields get an 'n/a' when None:

You'd like them to display "None" or just ""?

ZacharyLesser commented 6 months ago

The weird thing is that this was working properly before but now it has stopped.

See deep 5000.02

Nothing displaying for date of first production (BritDrama)

apjanco commented 6 months ago

I changed the fields being converted to 'n/a' when None. They are now changed to '' (blank)

ZacharyLesser commented 6 months ago

Ok if it is easy to change, then we can give you a complete list of fields and what should appear when there is no data.

Why does "nan" sometimes appear in the data?

apjanco commented 6 months ago

I don't see "nan" anywhere in the data. I did see "null" and removed them.

ZacharyLesser commented 6 months ago

Look at Title= 1&2 Fulgens and Lucrece in admin. Here's what it shows...

Screenshot_2023-12-21-15-21-38-31_40deb401b9ffe8e1df2f1cc5ba480b12.jpg

ZacharyLesser commented 6 months ago

I think the ideal here would be to fix this all in the data so the code that auto-fills these fields can be scrapped. This seems more sustainable long-term, right?

I emailed with an idea for how to do this efficiently.

apjanco commented 6 months ago

I removed all any code that changes a None into "n/a." N/a will only appear now if it's in the database. I also removed the "nan" from brit drama first performance .