Skip to content

Commit af6c05f

Browse files
Merge pull request #1334 from syucream/fix/dependencies
Update some modules
2 parents d3704e1 + 67ec3ef commit af6c05f

File tree

4 files changed

+932
-860
lines changed

4 files changed

+932
-860
lines changed

airone/lib/http.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,16 @@ def _is_valid(params, meta_info):
235235
continue
236236

237237
# The case specified value is str
238-
if _meta["type"] == str and "checker" in _meta and not _meta["checker"](params):
238+
if (
239+
isinstance(_meta["type"], type)
240+
and _meta["type"] is str
241+
and "checker" in _meta
242+
and not _meta["checker"](params)
243+
):
239244
return False
240245

241246
# The case specified value is list
242-
if _meta["type"] == list:
247+
if isinstance(_meta["type"], type) and _meta["type"] is list:
243248
if "checker" in _meta and not _meta["checker"](params):
244249
return False
245250

entry/api_v2/serializers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,8 @@ def _get_value(self, obj: AttributeValue) -> EntryAttributeValue:
998998
return {
999999
"as_array_object": [
10001000
{
1001-
"id": x.referral.id if x.referral else None,
1002-
"name": x.referral.name if x.referral else "",
1001+
"id": x.referral.id,
1002+
"name": x.referral.name,
10031003
"schema": {
10041004
"id": x.referral.entry.schema.id,
10051005
"name": x.referral.entry.schema.name,

0 commit comments

Comments
 (0)