underlay / underlay.org

https://www.underlay.org
GNU General Public License v2.0
23 stars 5 forks source link

fix: avoid uniqueness check for entities #77

Closed octref closed 2 years ago

octref commented 2 years ago

https://dev.underlay.org/zach/nyc-pizza/data only shows one item. That is because we check name to determine uniqueness and Zach used Name instead of name. We should do the uniqueness properly but for now let's just remove the check.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
underlay-org ✅ Ready (Inspect) Visit Preview May 17, 2022 at 9:52PM (UTC)
octref commented 2 years ago

It's true that we could rename Name to name in the schema and remap it, but I don't think having the implicit requirement to have a lowercase name somewhere in the schema make sense. We should use whatever attribute that user chooses for uniqueness as the uniqueness check. I can send a PR that does that too.

isTravis commented 2 years ago

Ah - I see, I didn't realize name was hardcoded. It's used as a variable name earlier in the line, so I got mixed up. In my branch we already use the users input for uniqueness rather than a hardcoded key.