Skip to content

Commit

Permalink
refactor: implement requested changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
micha91 committed Jul 25, 2024
1 parent 1ba7916 commit 0e07b41
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions polarion_rest_api_client/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
import json
import typing as t

field_at_start: list[str] | None = None
fields_at_end: list[str] | None = None
sidebar_work_item_fields: list[str] | None = None
fields_at_end_as_table: bool = False

BOOLEAN_RENDERING_PROPERTIES = ["fieldsAtEndAsTable", "hidden"]
RENDERING_LAYOUT_FIELDS = {
"fieldsAtEndAsTable": "fields_at_end_as_table",
"fieldsAtStart": "fields_at_start",
Expand Down Expand Up @@ -283,7 +279,7 @@ def __init__(
for prop in _properties:
key = prop["key"]
value = prop.get("value", "")
if key in ["fieldsAtEndAsTable", "hidden"]:
if key in BOOLEAN_RENDERING_PROPERTIES:
value = value == "true"
else:
value = value.split(",")
Expand Down

0 comments on commit 0e07b41

Please sign in to comment.