Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#334 Refactor Branch admin deleting #371

Merged
merged 1 commit into from
Apr 27, 2021

Conversation

viliambalaz
Copy link
Collaborator

No description provided.

if obj is None:
return True
return not obj.is_main
def delete_constraints(self, obj):
Copy link
Collaborator Author

@viliambalaz viliambalaz Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martinmacko47 Nie je to uplne potrebne, ale chcel som to spravit rovnako ako v Action. Potom ked spravim admin mazanie pre vsetky instancie, a tie casti kodu, ktore sa opakuju by som dal do spolocnej classy. Rovnako aj template.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ano, bolo by dobre spravit casom nejaky mixin, napriklad DeleteConstraintsAdminMixin, ktory definuje prazdnu abstraktnu metodu delete_constraints a pouzije ju v render_delete_form a delete_model, nech netreba tu logiku opakovat.

@martinmacko47
Copy link
Owner

@viliambalaz V dalsom PR asi teraz skus spravit hromadne mazania Action a Branch, ci to bude fungovat. Nech potom pre dalsie modely mozeme robit oba typy mazania naraz.

@viliambalaz viliambalaz merged commit 2b4c37a into master Apr 27, 2021
@viliambalaz viliambalaz deleted the feature/334/admin-delete-branch branch April 27, 2021 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants