#6387 [badges] Badge deletion script uses invalid SQL command, doesn't work
Closed: Upstream Opened by jflory7.

Summary

The delete-badge script uses an invalid SQL statement since recent changes to Tahrir and will not delete an invalid badge.

Stacktrace

From badges-backend01.phx2.fedoraproject.org.

$ sudo /usr/local/bin/delete-badge --badge fedora-women-day-attendee
deleting fedora-women-day-attendee
Failure: (ProgrammingError) relation "milestone" does not exist
LINE 2: FROM milestone 
             ^
 'SELECT milestone.id AS milestone_id, milestone.position AS milestone_position, milestone.badge_id AS milestone_badge_id, milestone.series_id AS milestone_series_id \nFROM milestone \nWHERE %(param_1)s = milestone.badge_id' {'param_1': u'fedora-women-day-attendee'}

Analysis

There were a lot of changes made to Tahrir over the last few months, including the introduction of things like milestones and pathways for badges. It's likely the SQL statement isn't current based on the recent changes to upstream Tahrir.

cc: @sayanchowdhury


So, this is all in tahrir itself... the script just connects to the db and calls a delete method.

Would you be willing to file this at https://github.com/fedora-infra/tahrir/issues ?

Or if you prefer I can...

@kevin Done! Feel free to close.

Metadata Update from @jflory7:
- Issue close_status updated to: Upstream
- Issue status updated to: Closed (was: Open)

Metadata