Opened 4 years ago
Closed 4 years ago
#33214 closed Cleanup/optimization (fixed)
Base DatabaseOperations missing format_for_duration_arithmetic() stub
| Reported by: | Tim Graham | Owned by: | Manaia Junior |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
When implementing a new database backend, I see the error "AttributeError: 'DatabaseOperations' object has no attribute 'format_for_duration_arithmetic'" rather than getting a message that the method must be implemented.
The method was introduced in 57554442fe3e209c135e15dda4ea45123e579e58.
Change History (5)
comment:1 by , 4 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 4 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 4 years ago
Note:
See TracTickets
for help on using tickets.
For this ticket, we need to add a stub method
format_for_duration_arithmetic(self, sql)to the BaseDatabaseOperations that would raiseNotImplementedErrore.g.Test for such methods are in tests/backends/base/test_operations.py.