Remove _signal argument to various methods

RESOLVED WONTFIX

Status

Marketplace
Code Quality
P5
enhancement
RESOLVED WONTFIX
3 years ago
3 years ago

People

(Reporter: mat, Unassigned)

Tracking

Avenir
Points:
---

Details

(Whiteboard: [ktlo][possible_future_need])

(Reporter)

Description

3 years ago
Some methods in zamboni (particularly ModelBase.update()) have a special _signal argument that can be set to prevent this method from firing signals like post_save.

It makes code more complicated and harder to follow. We should not prevent signals from being sent, we should write the signal handlers correctly to avoid issues.

One particular use-case we should look at is _signal=False passed in post_save handlers that do a .save() or .update() themselves. Maybe some of those handlers should be trigged on pre_save instead and just set the properties they want on the instance without triggering a .save()/.update(), letting the regular .save() call that is going to happen afterwards deal with saving the changes.

Updated

3 years ago
Priority: -- → P3
Whiteboard: [ktlo]

Updated

3 years ago
Severity: normal → enhancement
Priority: P3 → P5

Updated

3 years ago
Whiteboard: [ktlo] → [ktlo][possible_future_need]

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.