-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe pull request involves the removal of several files and components related to mapping employees in a workspace. The deleted files include Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (3)
apps/workspaces/apis/clone_settings/serializers.py (3)
Line range hint
15-24
: Remove remaining employee_mappings field declarationsThe PR aims to remove employee settings APIs, but the
employee_mappings
field is still declared in the serializer.Apply this diff to remove the field:
class CloneSettingsSerializer(serializers.ModelSerializer): export_settings = ReadWriteSerializerMethodField() import_settings = ReadWriteSerializerMethodField() advanced_configurations = ReadWriteSerializerMethodField() - employee_mappings = ReadWriteSerializerMethodField() workspace_id = serializers.SerializerMethodField() class Meta: model = Workspace fields = [ 'workspace_id', 'export_settings', 'import_settings', 'advanced_configurations', - 'employee_mappings' ] read_only_fields = ['workspace_id']
Line range hint
41-45
: Remove employee_mapping from update methodThe update method still processes employee mappings which should be removed.
Apply this diff:
def update(self, instance, validated): export_settings = validated.pop('export_settings') import_settings = validated.pop('import_settings') advanced_configurations = validated.pop('advanced_configurations') - employee_mapping = validated.pop('employee_mappings')
Line range hint
82-84
: Remove employee_mappings validationThe validate method still includes employee mappings validation which should be removed as part of the employee settings API removal.
Apply this diff:
if not data.get('advanced_configurations'): raise serializers.ValidationError('Advanced Settings are required') - if not data.get('employee_mappings'): - raise serializers.ValidationError('Employee Mappings are required') return data
🧹 Nitpick comments (1)
apps/workspaces/apis/clone_settings/serializers.py (1)
62-63
: Fix indentation in conditional blockThe indentation of the conditional block is inconsistent.
Apply this diff to fix the indentation:
- if export_settings_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 \
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/workspaces/apis/clone_settings/serializers.py
(1 hunks)tests/test_workspaces/test_apis/test_map_employee/fixtures.py
(0 hunks)tests/test_workspaces/test_apis/test_map_employee/test_serializers.py
(0 hunks)tests/test_workspaces/test_apis/test_map_employee/test_views.py
(0 hunks)
💤 Files with no reviewable changes (3)
- tests/test_workspaces/test_apis/test_map_employee/fixtures.py
- tests/test_workspaces/test_apis/test_map_employee/test_views.py
- tests/test_workspaces/test_apis/test_map_employee/test_serializers.py
🔇 Additional comments (1)
apps/workspaces/apis/clone_settings/serializers.py (1)
Line range hint 1-84
: Verify the impact of employee mappings removal
Let's verify that all references to employee mappings have been removed from the codebase.
|
Description
Clickup
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor
CloneSettingsSerializer
by removing employee mappings functionality.Chores