MCPcopy
hub / github.com/django/django / reduce

Method reduce

django/db/migrations/operations/models.py:1281–1288  ·  view source on GitHub ↗
(self, operation, app_label)

Source from the content-addressed store, hash-verified

1279 return "alter_%s_%s" % (self.model_name_lower, self.constraint.name.lower())
1280
1281 def reduce(self, operation, app_label):
1282 if (
1283 isinstance(operation, (AlterConstraint, RemoveConstraint))
1284 and self.model_name_lower == operation.model_name_lower
1285 and self.name == operation.name
1286 ):
1287 return [operation]
1288 return super().reduce(operation, app_label)

Callers

nothing calls this directly

Calls 1

reduceMethod · 0.45

Tested by

no test coverage detected