CDRH / african_poetics

Orchid / Rails site for Contemporary African Poets part of African Poetics site
0 stars 0 forks source link

Error Checking in inthenews/poet views #263

Closed karindalziel closed 1 year ago

karindalziel commented 1 year ago

I have changed the code a bit, but it's not right: https://github.com/CDRH/african_poetics/commit/7ee1b394a78de517a8c87b11a443651734d300f9

it's not erroring anymore though.

The issue seems to be that there is some inconsistency about how spatial is getting populated - sometimes there's a subarray to the properties and sometimes not

spatial |  
  country | "England"
  city |  
    0 | "London"

if there are sub values I assume the entire spatial property needs to be duplicated, rather than adding an array to a sub value

so, first, we need to check and see how this is populating

second, we need to change the if statements to make sure the data won't show if it's not there https://github.com/CDRH/african_poetics/blob/dev/app/views/inthenewspoets/items/show.html.erb#L23

karindalziel commented 1 year ago

https://cdrhdev1.unl.edu/african_poetics/inthenews/poets/item/apdp.work.000001

wkdewey commented 1 year ago

@karindalziel I see the code that would generate the subarray, and changed it, but when I do a post, it never hits that part.

Just did another pull from Airtable, there is nothing in the city column

wkdewey commented 1 year ago

I put in some fake data and got it to work

wkdewey commented 1 year ago

@karindalziel Do you also want to fix it so you can't have URLs like above (where it's trying to show the wrong type of item)?

wkdewey commented 1 year ago

I have made a separate issue for the problem of item names in the wrong section. See #272.