Skip to content

Commit

Permalink
Add updated function return_inventory_source_options to validate_unif…
Browse files Browse the repository at this point in the history
…ied_job_template
  • Loading branch information
djyasin committed Oct 22, 2024
1 parent 4b3d32f commit 329d817
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion awx/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5507,7 +5507,7 @@ def get_summary_fields(self, obj):
return summary_fields

def validate_unified_job_template(self, value):
if type(value) == InventorySource and value.source not in compute_cloud_inventory_sources():
if type(value) == InventorySource and value.source not in return_inventory_source_options():
raise serializers.ValidationError(_('Inventory Source must be a cloud resource.'))
elif type(value) == Project and value.scm_type == '':
raise serializers.ValidationError(_('Manual Project cannot have a schedule set.'))
Expand Down

0 comments on commit 329d817

Please sign in to comment.