(
historical_records_excluded_fields: typing.List[str] = None, # type: ignore[assignment]
change_details_excluded_fields: typing.Sequence[str] = None, # type: ignore[assignment]
show_change_details_for_create: bool = False,
)
| 216 | |
| 217 | |
| 218 | def abstract_base_auditable_model_factory( |
| 219 | historical_records_excluded_fields: typing.List[str] = None, # type: ignore[assignment] |
| 220 | change_details_excluded_fields: typing.Sequence[str] = None, # type: ignore[assignment] |
| 221 | show_change_details_for_create: bool = False, |
| 222 | ) -> typing.Type[AbstractBaseAuditableModel]: |
| 223 | class Base(AbstractBaseAuditableModel): |
| 224 | history = SoftDeleteAwareHistoricalRecords( |
| 225 | bases=[ |
| 226 | base_historical_model_factory( |
| 227 | change_details_excluded_fields or [], |
| 228 | show_change_details_for_create, |
| 229 | ) |
| 230 | ], |
| 231 | excluded_fields=historical_records_excluded_fields or [], |
| 232 | get_user=get_history_user, |
| 233 | inherit=True, |
| 234 | ) |
| 235 | |
| 236 | class Meta: |
| 237 | abstract = True |
| 238 | |
| 239 | return Base |
no outgoing calls
no test coverage detected
searching dependent graphs…