autonomous-app 0.2.10__py3-none-any.whl → 0.2.11__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.
autonomous/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.2.10"
1
+ __version__ = "0.2.11"
2
2
 
3
3
  from .logger import log
4
4
  from .model.automodel import AutoModel
@@ -137,28 +137,38 @@ class AutoModel(ABC):
137
137
  super().__setattr__(name, result)
138
138
 
139
139
  elif isinstance(obj, list):
140
+ results = []
141
+ scrubbed = False
140
142
  for i, item in enumerate(obj):
141
143
  if isinstance(item, DelayedModel):
142
144
  try:
143
145
  result = item._instance()
144
146
  except DanglingReferenceError as e:
145
147
  log(e)
146
- obj[i] = None
147
- self.save()
148
+ scrubbed = True
148
149
  else:
149
- obj[i] = result
150
+ results.append(result)
151
+ if scrubbed:
152
+ super().__setattr__(name, results)
153
+ obj = results
154
+ self.save()
150
155
 
151
156
  elif isinstance(obj, dict):
157
+ results = {}
158
+ scrubbed = False
152
159
  for key, item in obj.items():
153
160
  if isinstance(item, DelayedModel):
154
161
  try:
155
162
  result = item._instance()
156
163
  except DanglingReferenceError as e:
157
164
  log(e)
158
- obj[key] = None
159
- self.save()
165
+ scrubbed = True
160
166
  else:
161
- obj[key] = result
167
+ results[key] = result
168
+ if scrubbed:
169
+ super().__setattr__(name, results)
170
+ obj = results
171
+ self.save()
162
172
  return obj
163
173
 
164
174
  def __str__(self) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autonomous-app
3
- Version: 0.2.10
3
+ Version: 0.2.11
4
4
  Summary: Containerized application framework built on Flask with additional libraries and tools for rapid development of web applications.
5
5
  Author-email: Steven A Moore <samoore@binghamton.edu>
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- autonomous/__init__.py,sha256=6Gx0yWtceijOFZrDoqiDnCCUt7YhMRrM0fd-orCa4-g,87
1
+ autonomous/__init__.py,sha256=OrggKD9WEAtYqTxM-M1RdLzL_FmDjtisB4TRkdSq44k,87
2
2
  autonomous/cli.py,sha256=z4AaGeWNW_uBLFAHng0J_lfS9v3fXemK1PeT85u4Eo4,42
3
3
  autonomous/logger.py,sha256=hDX3gvbcWiGPvA8pfarih3xHS4aHG_NuNkF8PQfq_pM,1844
4
4
  autonomous/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -15,7 +15,7 @@ autonomous/errors/__init__.py,sha256=OruWG9IkAF4LN-OAo5c2K9Dnds4oZFJJQHKaXbQaWnA
15
15
  autonomous/errors/danglingreferenceerror.py,sha256=obfNjpn2vsyK4ak-UuuwFTMVzecs1SaeFPshOvnukS8,275
16
16
  autonomous/model/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
17
17
  autonomous/model/autoattribute.py,sha256=q09cORKC6-LpoZ3Ez-lRkd5kxuSFQrB2nA2f9_8k2c8,588
18
- autonomous/model/automodel.py,sha256=dkeBWG5oPqFDBpm_aLfPJ0EvxQHQQ1VFSIItAfbSGNQ,11853
18
+ autonomous/model/automodel.py,sha256=inJHhLJDIhz9SGGWmKQzYKiMhzj_0N0KG3kNc5JLb8E,12226
19
19
  autonomous/model/orm.py,sha256=IJrbp15RmBgF61vLsqcS_VdnAnw9736sLW75_xFYE9Y,2521
20
20
  autonomous/model/serializer.py,sha256=EnjyS-aWFTt1aDtEavR2xAmNGTX75cekTovohBfPhb0,2939
21
21
  autonomous/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -29,8 +29,8 @@ autonomous/storage/version_control/GHVersionControl.py,sha256=VIhVRxe6gJgozFWyhy
29
29
  autonomous/storage/version_control/__init__.py,sha256=tP0bAWYl1RwBRi62HsIidmgyqHuSlCUqwGuKUKKRugc,117
30
30
  autonomous/tasks/__init__.py,sha256=pn7iZ14MhcHUdzcLkfkd4-45wgPP0tXahAz_cFgb_Tg,32
31
31
  autonomous/tasks/autotask.py,sha256=_WQ8w1LyV2FVJ0Ct0FoF9q1W8ClXfS57-omnBb0LNWE,4910
32
- autonomous_app-0.2.10.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
33
- autonomous_app-0.2.10.dist-info/METADATA,sha256=TwXgcegPilBX155OpzKZ25S9gJSryHQtSeQ1Yh1-K4s,4229
34
- autonomous_app-0.2.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
35
- autonomous_app-0.2.10.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
36
- autonomous_app-0.2.10.dist-info/RECORD,,
32
+ autonomous_app-0.2.11.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
33
+ autonomous_app-0.2.11.dist-info/METADATA,sha256=KiLOPviT5APJ1g1TIYTB664DzwGHTMNhLikUVPI2arc,4229
34
+ autonomous_app-0.2.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
35
+ autonomous_app-0.2.11.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
36
+ autonomous_app-0.2.11.dist-info/RECORD,,