mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-31 22:53:21 +02:00
review feedback:
This commit is contained in:
@@ -47,6 +47,10 @@ class ScriptModuleSerializer(ValidatedModelSerializer):
|
||||
raise serializers.ValidationError(
|
||||
_("Cannot upload a file and sync from an existing data file.")
|
||||
)
|
||||
if upload_file and data.get('data_source'):
|
||||
raise serializers.ValidationError(
|
||||
_("Cannot upload a file and sync from a data source.")
|
||||
)
|
||||
if self.instance is None and not upload_file and not data.get('data_file'):
|
||||
raise serializers.ValidationError(
|
||||
_("Must upload a file or select a data file to sync.")
|
||||
|
||||
Reference in New Issue
Block a user