diff --git a/app/centurion/tests/functional_models.py b/app/centurion/tests/functional_models.py index 9612ba8a..29c80f71 100644 --- a/app/centurion/tests/functional_models.py +++ b/app/centurion/tests/functional_models.py @@ -26,11 +26,9 @@ class ModelTestCases: @pytest.fixture( scope = 'function' ) def created_model(self, django_db_blocker, model, model_kwargs): - if model._meta.abstract: + model_object = None - yield None - - else: + if not model._meta.abstract: with django_db_blocker.unblock(): @@ -42,7 +40,8 @@ class ModelTestCases: with django_db_blocker.unblock(): - model_object.delete() + if model_object: + model_object.delete() diff --git a/docs/projects/centurion_erp/development/models.md b/docs/projects/centurion_erp/development/models.md index d6ac0684..9433649e 100644 --- a/docs/projects/centurion_erp/development/models.md +++ b/docs/projects/centurion_erp/development/models.md @@ -302,7 +302,6 @@ This section details the additional items that may need to be done when adding a - If the model is a primary model, add it to the model link slash command in `app/core/lib/slash_commands/linked_model.py` function `command_linked_model` - ## Knowledge Base Article linking All Tenancy Models must have the ability to be able to have a knowledge base article linked to it. To do so the following must be done: