(target, value, oldvalue, initiator)
| 21 | |
| 22 | |
| 23 | def update_fit_modified(target, value, oldvalue, initiator): |
| 24 | if not target.owner: |
| 25 | return |
| 26 | |
| 27 | if value != oldvalue: |
| 28 | # some things (like Implants) have a backref to the fit, which actually produces a list. |
| 29 | # In this situation, simply take the 0 index to get to the fit. |
| 30 | # There may be cases in the future in which there are multiple fits, so this should be |
| 31 | # looked at more indepth later |
| 32 | if isinstance(target.owner, InstrumentedList): |
| 33 | parent = target.owner[0] |
| 34 | else: |
| 35 | parent = target.owner |
| 36 | |
| 37 | # ensure this is a fit we're dealing with |
| 38 | if isinstance(parent, Fit): |
| 39 | parent.modified = datetime.datetime.now() |
| 40 | |
| 41 | |
| 42 | def apply_col_listeners(target, context): |
nothing calls this directly
no outgoing calls
no test coverage detected