javrasya / river-admin

:rocket: A shiny admin interface for django-river built with DRF, Vue & Vuetify
https://riveradminproject.com/
BSD 3-Clause "New" or "Revised" License
94 stars 24 forks source link

Support deleting transitions on workflows #3

Open javrasya opened 4 years ago

javrasya commented 4 years ago

Description: Once a transition is created there is no way back

Acceptance Criteria:

noobmaster19 commented 4 years ago

Hello , is there any updates on this? I wish to contribute however im pretty new to programming. So far i have tried to convert the on_delete = PROTECT to on_delete = models.CASCADE for the transitionmeta model and converting the transitionmeta field within transition from on_delete = PROTECT to on_delete= models.SET_NULL , it seems to be working but i am not sure if there is any repercussions in doing so

javrasya commented 4 years ago

Hi @neowenshun , this has nothing to do with delete permissions between models. If you use river-admin, you would notice that it doesn't have the capability of deleting transitions. So this is about it. Even though this support were to be added to riveradmin, it would still not be possible to delete a transition meta when there are transitions that belong to it.

Making transition metas protected when there are transitions belong to it is a desired feature. One can simply delete all the transitions first before deleting the transition meta if it is really wanted to delete it. This is a choice by design, so that one can't delete the entire history just by deleting a transition meta accidentally. These operations require more attention.