mirror of https://github.com/jumpserver/jumpserver
fix: Ensure platform_id is a digit before querying Platform
parent
e4be9621bb
commit
53a84850dc
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue