-
-
Notifications
You must be signed in to change notification settings - Fork 351
Description
I'm curious why the JSON.parse call is being done here:
| value = JSON.parse($(item).attr("data-value")), |
This feels unnecessarily restrictive-forcing all values through JSON.parse effectively assumes they're simple integers, which breaks support for UUID primary keys (a very common pattern in modern Django projects). I removed this locally and saw no adverse effects; UUIDs work fine without this coercion.
It's also not clear what benefit this provides—if the intent was to mitigate a security issue, it doesn’t seem to meaningfully do so (e.g., chaining through multiple foreign keys isn't addressed here anyway).
To make matters worse, because the library doesn't let us specify the key field manually, we can't even work around this by introducing an auto-increment surrogate key without doing a full backfill of every FK relationship. That’s a non-trivial and high-risk migration for many production systems.
Would you be open to removing or relaxing this behavior to support non-integer primary keys like UUIDs? It would make this package far more compatible with common modern usage.