sql: declare loggederror id field as integer (#52666)
This is the default value, it avoids a DataError trace when using .get() with a non-integer value.
This commit is contained in:
parent
29ac5ab0d3
commit
eace88afc9
|
@ -249,3 +249,16 @@ def test_backoffice_access(pub):
|
|||
pub.cfg['admin-permissions'] = {'forms': ['X'], 'cards': ['X'], 'workflows': ['X']}
|
||||
pub.write_cfg()
|
||||
resp = app.get('/backoffice/studio/logged-errors/', status=403)
|
||||
|
||||
|
||||
def test_logged_error_404(pub):
|
||||
pub.loggederror_class.wipe()
|
||||
|
||||
create_superuser(pub)
|
||||
app = login(get_app(pub))
|
||||
|
||||
# check non-existent id
|
||||
app.get('/backoffice/studio/logged-errors/1', status=404)
|
||||
|
||||
# check invalid (non-integer) id
|
||||
app.get('/backoffice/studio/logged-errors/null', status=404)
|
||||
|
|
|
@ -2956,8 +2956,6 @@ class LoggedError(SqlMixin, wcs.logged_errors.LoggedError):
|
|||
('latest_occurence_timestamp', 'timestamptz'),
|
||||
]
|
||||
|
||||
_numerical_id = False
|
||||
|
||||
@guard_postgres
|
||||
@invalidate_substitution_cache
|
||||
def store(self):
|
||||
|
|
Loading…
Reference in New Issue