grassrootsgrocery / admin-portal

GNU Affero General Public License v3.0
10 stars 5 forks source link

Fixes issue of blank user in airtable by filtering returned users. #101

Closed 6mp closed 1 year ago

railway-app[bot] commented 1 year ago

This PR is being deployed to Railway 🚅

admin-portal: ◻️ REMOVED

mattsahn commented 1 year ago

Per my comment in Monday, rather than doing all this filtering, I think we can just change this:

Users?filterByFormula=SEARCH(Username, "${username}") != ""

to this:

Users?filterByFormula=Username="${username}"

6mp commented 1 year ago

I think the issue with the formula is the arguments are swapped, I changed it to SEARCH("${username}",Username) and it works as intended now without a second filter needed.

6mp commented 1 year ago

Would you like me to use your formula and remove the second filter @mattsahn?

mattsahn commented 1 year ago

Would you like me to use your formula and remove the second filter @mattsahn?

yeah, it's a bit more straightforward/concise looking, imo.