Uncaught error when uploading same apk again
Steps to reproduce
- Go to repo index
- Click on "browse to upload" and select an apk
- Click on "add"
- On edit screen, upload same apk again
- Click on done
Logs
Traceback:
File "/home/nico/Work/Current/F-Droid/repomaker/maker/views/app.py" in form_valid
124. raise e
File "/home/nico/Work/Current/F-Droid/repomaker/maker/views/app.py" in form_valid
121. pointer.initialize() # this also attaches the app
File "/home/nico/Work/Current/F-Droid/repomaker/maker/models/apk.py" in initialize
152. self.save()
Exception Type: IntegrityError at /repo/1/app/2/edit/
Exception Value: UNIQUE constraint failed: maker_apkpointer.apk_id, maker_apkpointer.app_id