Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.db import models
from functools import partialmethod
from specifyweb.specify.models import datamodel, custom_save
from ..workbench.models import Dataset
from specifyweb.workbench.models import Dataset

class Spattachmentdataset(Dataset):
specify_model = datamodel.get_table('spattachmentdataset')
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/businessrules/rules/attachment_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def attachment_save(attachment):

@orm_signal_handler('post_delete', 'Attachment')
def attachment_deletion(attachment):
from specifyweb.attachment_gw.views import delete_attachment_file
from specifyweb.backend.attachment_gw.views import delete_attachment_file
if attachment.attachmentlocation is not None:
delete_attachment_file(attachment.attachmentlocation)

Expand Down
2 changes: 1 addition & 1 deletion specifyweb/context/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.urls import path

from . import views, user_resources, collection_resources
from ..attachment_gw.views import get_settings as attachment_settings
from ..backend.attachment_gw.views import get_settings as attachment_settings
from ..report_runner.views import get_status as report_runner_status

urlpatterns = [
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def get_sa_db_url(db_name):
'specifyweb.businessrules',
'specifyweb.express_search',
'specifyweb.context',
'specifyweb.attachment_gw',
'specifyweb.backend.attachment_gw',
'specifyweb.frontend',
'specifyweb.barvis',
'specifyweb.patches',
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/specify/models_by_table_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def import_model(model_name):
if model_name in model_names:
def get_model():
from importlib import import_module
if app_name in ['accounts', 'permissions']:
if app_name in ['accounts', 'permissions', 'attachment_gw']:
module = import_module(f"specifyweb.backend.{app_name}.models")
else:
module = import_module(f"specifyweb.{app_name}.models")
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/specify/tests/test_record_merging.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def test_ordering_fix_on_agent_specialty(self):
self.assertEqual(models.Agentspecialty.objects.filter(specialtyname__in=['test_name_1', 'test_name_3']).count(),
2)

@patch('specifyweb.attachment_gw.views.delete_attachment_file')
@patch('specifyweb.backend.attachment_gw.views.delete_attachment_file')
def test_attachment_preserved(self, delete_attachment_mock):
c = Client()
c.force_login(self.specifyuser)
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/specify/tests/test_utils/test_get_app_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# These are done as part of tests.
from specifyweb.backend.accounts import models as acccounts_models
from specifyweb.attachment_gw import models as attachment_gw_models
from specifyweb.backend.attachment_gw import models as attachment_gw_models
from specifyweb.businessrules import models as businessrules_models
from specifyweb.context import models as context_models
from specifyweb.notifications import models as notifications_models
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/specify/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging

from specifyweb.backend.accounts import models as acccounts_models
from specifyweb.attachment_gw import models as attachment_gw_models
from specifyweb.backend.attachment_gw import models as attachment_gw_models
from specifyweb.businessrules import models as businessrules_models
from specifyweb.context import models as context_models
from specifyweb.notifications import models as notifications_models
Expand Down
2 changes: 1 addition & 1 deletion specifyweb/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.views.generic.base import RedirectView

from specifyweb.backend.accounts import urls as accounts_urls
from .attachment_gw import urls as attachment_urls
from specifyweb.backend.attachment_gw import urls as attachment_urls
from .barvis import urls as tt_urls
from .businessrules import urls as bus_urls
from .context import urls as context_urls
Expand Down