Skip to content

Commit

Permalink
Add validate_table_existence to abstract SettingsManager (#5236)
Browse files Browse the repository at this point in the history
The `BackendManager` was using the `validate_table_existence` from its
`SettingsManager` member, but this method was not defined in the abstract
class. It was present in both backends implementations, but there would
be nothing requiring from the abstract parent class.

Co-authored-by: Chris Sewell <[email protected]>
  • Loading branch information
ramirezfranciscof and chrisjsewell authored Dec 7, 2021
1 parent 1890bab commit 0682f14
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aiida/backends/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ def delete(self, key):
:raises: `~aiida.common.exceptions.NotExistent` if the settings does not exist
"""

@abc.abstractmethod
def validate_table_existence(self):
"""Verify that the `DbSetting` table actually exists.
:raises: `~aiida.common.exceptions.NotExistent` if the settings table does not exist
"""


class BackendManager:
"""Class to manage the database schema and environment."""
Expand Down

0 comments on commit 0682f14

Please sign in to comment.