python-terminusgps 25.0.2__py3-none-any.whl → 25.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 25.0.2
3
+ Version: 25.0.3
4
4
  Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
5
5
  Project-URL: Documentation, https://app.terminusgps.com/docs/apps/python-terminusgps/index.html
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -23,14 +23,14 @@ terminusgps/wialon/logger.py,sha256=nUBsaLMaffSaAHGHAM6mFXDzix9hbNecVtA3INVtii8,
23
23
  terminusgps/wialon/session.py,sha256=t3d7trBQRxnXFnex73alSSD5n2LDTZQ9VAtzUKIERto,9670
24
24
  terminusgps/wialon/utils.py,sha256=Y7fo9a81w84b3N39h1AmVLS-AnC3aRT5R137hIsqCHU,6723
25
25
  terminusgps/wialon/items/__init__.py,sha256=3BVthghekMvhMQSzQgBMlD_phxmKSmp3Zvmo-z0O8Bs,211
26
- terminusgps/wialon/items/base.py,sha256=nCh635XgF68YjlppbGYZeG2wah7Ic_aSc7RM2AKO4VU,7004
26
+ terminusgps/wialon/items/base.py,sha256=zINd7NWeq4EGQgRhq6bNfEymeyq3uojn8HD71HvhJaQ,6998
27
27
  terminusgps/wialon/items/resource.py,sha256=qmQKEakJa9LH5YkI9-iBDA0hsotc5ctcwdb7kZuXdfQ,14549
28
28
  terminusgps/wialon/items/retranslator.py,sha256=8q9EDc92w92MElnHIeEzH3Ra4kiPXrx4t9V5nPDZuRU,3728
29
29
  terminusgps/wialon/items/route.py,sha256=PTJx1gmT_PGz7nlSSUS2VzjYD-aAuvkEOIdIFneUSSQ,1148
30
30
  terminusgps/wialon/items/unit.py,sha256=uHQrauVkh2556kZp0Dh3WLZvQ6WJIWkibGgPYW1ljPE,9177
31
31
  terminusgps/wialon/items/unit_group.py,sha256=Stp-WfCGbOqcnxV6FU1AKtV7KIxIwCHa0NwhNJfgRoM,5032
32
32
  terminusgps/wialon/items/user.py,sha256=INwAibQVmjNNelepQXMfDevgJqMvIjHHgEjAMLRvhB0,7082
33
- python_terminusgps-25.0.2.dist-info/METADATA,sha256=V68lUH5lPEzK8IL-_PS1bndlepZG4I_Y58ivHXb20oc,946
34
- python_terminusgps-25.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
- python_terminusgps-25.0.2.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
36
- python_terminusgps-25.0.2.dist-info/RECORD,,
33
+ python_terminusgps-25.0.3.dist-info/METADATA,sha256=wUbbi7rTr9yWRuwoo-MVWZLXE41Dk1QEt3npcZfvl28,946
34
+ python_terminusgps-25.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
35
+ python_terminusgps-25.0.3.dist-info/licenses/COPYING,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
36
+ python_terminusgps-25.0.3.dist-info/RECORD,,
@@ -217,24 +217,17 @@ class WialonBase:
217
217
  @property
218
218
  def cfields(self) -> dict:
219
219
  """Custom fields associated with the Wialon object."""
220
- fields = (
221
- self.session.wialon_api.core_search_item(
222
- **{"id": self.id, "flags": flags.DATAFLAG_UNIT_CUSTOM_FIELDS}
223
- )
224
- .get("item", {})
225
- .get("cfields")
220
+ response = self.session.wialon_api.core_search_item(
221
+ **{"id": self.id, "flags": flags.DATAFLAG_UNIT_CUSTOM_FIELDS}
226
222
  )
227
-
228
- return {field["n"]: field["v"] for _, field in fields.items()} if fields else {}
223
+ fields = response.get("item", {}).get("flds") if response is not None else {}
224
+ return {field["n"]: field["v"] for field in fields.values()} if fields else {}
229
225
 
230
226
  @property
231
227
  def afields(self) -> dict:
232
228
  """Admin fields associated with the Wialon object."""
233
- fields = (
234
- self.session.wialon_api.core_search_item(
235
- **{"id": self.id, "flags": flags.DATAFLAG_UNIT_ADMIN_FIELDS}
236
- )
237
- .get("item", {})
238
- .get("afields")
229
+ response = self.session.wialon_api.core_search_item(
230
+ **{"id": self.id, "flags": flags.DATAFLAG_UNIT_ADMIN_FIELDS}
239
231
  )
240
- return {field["n"]: field["v"] for _, field in fields.items()} if fields else {}
232
+ fields = response.get("item", {}).get("aflds") if response is not None else {}
233
+ return {field["n"]: field["v"] for field in fields.values()} if fields else {}