codeforamerica / cfapi

The Code for America API. Tracks and motivates activity and participation across the civic technology movement.
http://codeforamerica.org/api
MIT License
113 stars 52 forks source link

For csv-based project lists, link_url field doesn't update properly #300

Open verythorough opened 8 years ago

verythorough commented 8 years ago

Our brigade, OpenSMC, uses a google sheets csv file to curate our project list. For reference, our results in the cfapi can be found here.

Many of our projects don't have websites yet, so the link_url field in the csv is blank. I've discovered that this causes some unintended results in the cfapi, depending on whether fields are (or were) completed in the csv, the project repo (using the Edit button at the top of the repo page), or in the parent repo if the project is forked:

csv link_url project repo homepage (if forked) project parent homepage cfapi link_url working as intended?
filled any any csv value yes
empty (never filled) empty empty or not forked null yes
empty (never filled) filled any repo value maybe?
empty (never filled) empty filled parent value probably not
empty, but previously filled any any last filled csv value no

In one half-hearted attempt, I tried entering "" or null in the csv for two of the projects. Of course, the cfapi just interpreted these as strings and displayed them as such. Now that I've deleted those values, they remain in the cfapi, as described in the last row of the table.

I've taken a peek at run_update.py, but haven't pinpointed the source of the issue yet.

ondrae commented 8 years ago

Weird. I'll check it out. In the meantime I reloaded your projects to get rid of that "null". The empty "" is still there for now though.