Closed tomtom5152 closed 8 years ago
Whilst this still exists, it hasn't been an issue at all => closed
I disagree, there is blatantly incorrect data in RIGS. People trust past events, and use them as a basis for planning future events. If you're happy for me to run the above script, it can be fixed in about 10 seconds
Is that not just deleting the quotes, surely even if they weren't rigs, the info may still be of some use?
@tomtom5152 The info could be useful, but right now it's associated with random rigs. EventItems from quote pk=7 have ended up associated with rig pk=7 So you could potentially end up with WOF kit ending up associated with an open mic night
Ah ok I misunderstood the issue. In that case, if you are confident that script is correct and you have appropriate snapshots etc, feel free to run it.
Did this thing
Originally reported by: David Taylor (BitBucket: davidtaylorhq, GitHub: davidtaylorhq)
During the import from Postec RIGS, a missing condition in an SQL statement (here) has resulted in items originally associated with "quotes" being associated with "events" in the new system.
The items can be identified in the old database using the SQL statement:
The solution is to delete all of these items from the new system. This will return all events to the correct state. This should be done while adding a revision to the reversion history.
A one-time script to do this is:
This can be run using manage.py shell
Currently this throws ValidationErrors on event.save() due to issue #156