Closed friep closed 10 months ago
I think this has happened before, I ll try to fix it now https://github.com/CorrelAid/correlaid_website/issues/110
Yey easy fix. I dont know what causes this :S
documenting for future me/us: i wanted to recreate the project and turns out it was not an issue of the projects table... i could create the project without adding either Local Chapters or Organizations - when i try to do either i get the ID has to be unique error. When i go into the respective M2M collections, i find "dangling" entries. when i delete them, i can add the LC. for the organization i haven't found a fix.
@jstet maybe you can try your "fix" for the Oragnizations_Projects collection? 🤔
SELECT SETVAL('public."Organizations_Projects_id_seq"', (SELECT max(id) FROM public."Organizations_Projects"));
ALTER TABLE public."Organizations_Projects" ALTER COLUMN id SET DEFAULT nextval('"Organizations_Projects_id_seq"'::regclass);
fixed it for organitations, but doing the same to LCs caused a different error that I am working on now
Nvm it worked as well, forgot the "id_seq"
"Fixed" it. @friep could you please confirm this and close this issue if you think this is resolved?
I can't create new items in the projects collection and could not update a certain one (2019-01-MAP). ended up deleting it and tried to recreate it but still got the same error. See screenshot. @jstet maybe can you dig into the database and check whether there is indeed a duplicate ID? it's all very odd :(