roadmap
roadmap copied to clipboard
Fixed bug in org links validator
We came across an issue in with the Org Links Validator last week that was being caused by an edge case.
The issue is that the k variable referenced in the validator does not exist.
It was an edge case because the Org model defaults the value to {"org":[]}. We had some old records in our DB though that had a NULL value in the field, and our admin tried to merge one of them.
To replicate the issue:
- Manually set an org's links value in the database. For example:
UPDATE orgs SET links = NULL WHERE id = ?; - Then trigger a call to the
valid?method on the org somewhere in the code. We discovered it when trying to merge 2 orgs, but you could just as well add aputs @org.valid?line on the "Org details" page.