PhilanthropyDataCommons / service

A project for collecting and serving public information associated with grant applications
GNU Affero General Public License v3.0
8 stars 2 forks source link

Fix seed file typo #975

Closed hminsky2002 closed 4 months ago

hminsky2002 commented 4 months ago

I just noticed that when editing the seed file in this commit, I accidentally typed some of the base fields that were supposed to be of type 'URL' as 'url.' This is a quick fix for those instances!

slifty commented 4 months ago

The irony is that we tend to not use upper case any of the enum values -- the enum value for url is the thing that is not like the others / I would have actually expected it to be url not URL.

I'm very minorly torn on whether we should fix that... cc @reefdog thoughts as an API user?

reefdog commented 4 months ago

@slifty Ah, I'm glad you asked! Yes, I would expect the value to be lowercase. At least, alongside the other enum values:

export enum BaseFieldDataType {
    STRING = 'string',
    NUMBER = 'number',
    PHONE_NUMBER = 'phone_number',
    EMAIL = 'email',
    URL = 'URL',
    BOOLEAN = 'boolean',
}
slifty commented 4 months ago

@hminsky2002 migrations aren't a dirty word -- I think we should still merge the fix, but then sigh -- let's go ahead and update the enum to match the rest of 'em. Sorry I didn't catch this in the initial code review!