Skip to content

Commit

Permalink
fix ImportError
Browse files Browse the repository at this point in the history
fix ImportError: cannot import name 'SoftDeleteManager' from 'onadata.libs.models'
  • Loading branch information
kelvin-muchiri committed Oct 22, 2024
1 parent f21c641 commit 6f3804e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion onadata/apps/logger/models/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from django.contrib.auth import get_user_model
from django.db import models

from onadata.libs.models.base_model import SoftDeleteManager
from onadata.libs.models import SoftDeleteManager


def get_original_filename(filename):
Expand Down
2 changes: 1 addition & 1 deletion onadata/apps/logger/models/data_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from django.utils.translation import gettext as _

from onadata.apps.viewer.parsed_instance_tools import get_where_clause
from onadata.libs.models.base_model import SoftDeleteManager
from onadata.libs.models import SoftDeleteManager
from onadata.libs.models.sorting import ( # noqa pylint: disable=unused-import
json_order_by,
json_order_by_params,
Expand Down
2 changes: 2 additions & 0 deletions onadata/libs/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
"""
Model utility classes and functions.
"""

from .base_model import BaseModel # noqa
from .base_model import SoftDeleteManager # noqa

0 comments on commit 6f3804e

Please sign in to comment.