mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 13:31:27 +00:00
fix: Rename id
field to field_id
as apparently some clients cache values based on the id field alone
This commit is contained in:
parent
37b2e0e61a
commit
64c4fbf68a
|
@ -105,7 +105,7 @@ def service_dns_to_graphql(record: ServiceDnsRecord) -> DnsRecord:
|
||||||
|
|
||||||
@strawberry.interface
|
@strawberry.interface
|
||||||
class ConfigItem:
|
class ConfigItem:
|
||||||
id: str
|
field_id: str
|
||||||
description: str
|
description: str
|
||||||
widget: str
|
widget: str
|
||||||
type: str
|
type: str
|
||||||
|
@ -135,7 +135,7 @@ def config_item_to_graphql(item: dict) -> ConfigItem:
|
||||||
item_type = item.get("type")
|
item_type = item.get("type")
|
||||||
if item_type == "string":
|
if item_type == "string":
|
||||||
return StringConfigItem(
|
return StringConfigItem(
|
||||||
id=item["id"],
|
field_id=item["id"],
|
||||||
description=item["description"],
|
description=item["description"],
|
||||||
widget=item["widget"],
|
widget=item["widget"],
|
||||||
type=item_type,
|
type=item_type,
|
||||||
|
@ -145,7 +145,7 @@ def config_item_to_graphql(item: dict) -> ConfigItem:
|
||||||
)
|
)
|
||||||
elif item_type == "bool":
|
elif item_type == "bool":
|
||||||
return BoolConfigItem(
|
return BoolConfigItem(
|
||||||
id=item["id"],
|
field_id=item["id"],
|
||||||
description=item["description"],
|
description=item["description"],
|
||||||
widget=item["widget"],
|
widget=item["widget"],
|
||||||
type=item_type,
|
type=item_type,
|
||||||
|
@ -154,7 +154,7 @@ def config_item_to_graphql(item: dict) -> ConfigItem:
|
||||||
)
|
)
|
||||||
elif item_type == "enum":
|
elif item_type == "enum":
|
||||||
return EnumConfigItem(
|
return EnumConfigItem(
|
||||||
id=item["id"],
|
field_id=item["id"],
|
||||||
description=item["description"],
|
description=item["description"],
|
||||||
widget=item["widget"],
|
widget=item["widget"],
|
||||||
type=item_type,
|
type=item_type,
|
||||||
|
|
Loading…
Reference in a new issue