Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove employee settings apis #707

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
13 changes: 2 additions & 11 deletions apps/workspaces/apis/clone_settings/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from apps.workspaces.apis.import_settings.serializers import ImportSettingsSerializer
from apps.workspaces.apis.advanced_configurations.serializers import AdvancedConfigurationsSerializer
from apps.workspaces.apis.map_employees.serializers import MapEmployeesSerializer


class CloneSettingsSerializer(serializers.ModelSerializer):
Expand Down Expand Up @@ -42,9 +41,6 @@ def get_import_settings(self, instance):
def get_advanced_configurations(self, instance):
return AdvancedConfigurationsSerializer(instance).data

def get_employee_mappings(self, instance):
return MapEmployeesSerializer(instance).data

def update(self, instance, validated):
export_settings = validated.pop('export_settings')
import_settings = validated.pop('import_settings')
Expand All @@ -63,16 +59,11 @@ def update(self, instance, validated):
instance, data=advanced_configurations, partial=True
)

employee_mapping_serializer = MapEmployeesSerializer(
instance, data=employee_mapping, partial=True
)

if export_settings_serializer.is_valid(raise_exception=True) and employee_mapping_serializer.is_valid(raise_exception=True) \
and import_settings_serializer.is_valid(raise_exception=True) and \
if export_settings_serializer.is_valid(raise_exception=True) and \
import_settings_serializer.is_valid(raise_exception=True) and \
advanced_configurations_serializer.is_valid(raise_exception=True):

with transaction.atomic():
employee_mapping_serializer.save()
export_settings_serializer.save()
import_settings_serializer.save()
advanced_configurations_serializer.save()
Expand Down
Empty file.
54 changes: 0 additions & 54 deletions apps/workspaces/apis/map_employees/serializers.py

This file was deleted.

15 changes: 0 additions & 15 deletions apps/workspaces/apis/map_employees/triggers.py

This file was deleted.

11 changes: 0 additions & 11 deletions apps/workspaces/apis/map_employees/views.py

This file was deleted.

2 changes: 0 additions & 2 deletions apps/workspaces/apis/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
from apps.workspaces.apis.errors.views import ErrorsView
from apps.workspaces.apis.export_settings.views import ExportSettingsView
from apps.workspaces.apis.import_settings.views import ImportSettingsView, ImportCodeFieldView
from apps.workspaces.apis.map_employees.views import MapEmployeesView
from apps.workspaces.apis.clone_settings.views import CloneSettingsView

urlpatterns = [
path('<int:workspace_id>/export_settings/', ExportSettingsView.as_view()),
path('<int:workspace_id>/map_employees/', MapEmployeesView.as_view()),
path('<int:workspace_id>/import_settings/import_code_fields_config/', ImportCodeFieldView.as_view(), name='import-code-fields-config'),
path('<int:workspace_id>/import_settings/', ImportSettingsView.as_view()),
path('<int:workspace_id>/advanced_configurations/', AdvancedConfigurationsView.as_view()),
Expand Down
Empty file.
6 changes: 0 additions & 6 deletions tests/test_workspaces/test_apis/test_map_employee/fixtures.py

This file was deleted.

This file was deleted.

38 changes: 0 additions & 38 deletions tests/test_workspaces/test_apis/test_map_employee/test_views.py

This file was deleted.

Loading