move limit field from InventorySourceSerializer to InventorySourceOptionsSerializer (#13464)

InventorySourceOptionsSerializer is the parent for both InventorySourceSerializer and InventoryUpdateSerializer

The limit option need to be exposed to both inventory_source and inventory_update
This commit is contained in:
Hao Liu
2023-01-24 11:24:50 -05:00
committed by GitHub
parent 8538d37702
commit d4840b240b

View File

@@ -2040,6 +2040,7 @@ class InventorySourceOptionsSerializer(BaseSerializer):
'custom_virtualenv', 'custom_virtualenv',
'timeout', 'timeout',
'verbosity', 'verbosity',
'limit',
) )
read_only_fields = ('*', 'custom_virtualenv') read_only_fields = ('*', 'custom_virtualenv')
@@ -2083,7 +2084,7 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt
class Meta: class Meta:
model = InventorySource model = InventorySource
fields = ('*', 'name', 'inventory', 'update_on_launch', 'update_cache_timeout', 'source_project', 'limit') + ( fields = ('*', 'name', 'inventory', 'update_on_launch', 'update_cache_timeout', 'source_project') + (
'last_update_failed', 'last_update_failed',
'last_updated', 'last_updated',
) # Backwards compatibility. ) # Backwards compatibility.