mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 06:46:24 +00:00
fix: Ensure platform_id is a digit before querying Platform
This commit is contained in:
@@ -46,7 +46,7 @@ class DatabaseSerializer(AssetSerializer):
|
||||
elif self.context.get('request'):
|
||||
platform_id = self.context['request'].query_params.get('platform')
|
||||
|
||||
if not platform and platform_id:
|
||||
if not platform and platform_id and platform_id.isdigit():
|
||||
platform = Platform.objects.filter(id=platform_id).first()
|
||||
return platform
|
||||
|
||||
|
Reference in New Issue
Block a user