nova-mvvm 0.13.1__py3-none-any.whl → 0.13.2__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.
@@ -142,6 +142,7 @@ class StateConnection:
142
142
  """Connection that uses a state variable."""
143
143
 
144
144
  def __init__(self, communicator: TrameCommunicator, state_variable_name: Optional[str]) -> None:
145
+ self.has_errors = False
145
146
  self.state_variable_name = state_variable_name
146
147
  self.communicator = communicator
147
148
  self.state = communicator.state
@@ -226,6 +227,7 @@ class StateConnection:
226
227
  errors = get_errored_fields_from_validation_error(e)
227
228
  error = e
228
229
  updated = True
230
+ self.has_errors = True
229
231
  elif isinstance(self.viewmodel_linked_object, dict):
230
232
  self.viewmodel_linked_object.update(kwargs[state_variable_name])
231
233
  updates.append(state_variable_name)
@@ -234,6 +236,9 @@ class StateConnection:
234
236
  updates.append(state_variable_name)
235
237
  else:
236
238
  raise Exception("cannot update", self.viewmodel_linked_object)
239
+ if self.has_errors and not errors:
240
+ updated = True
241
+ self.has_errors = False
237
242
  if updated:
238
243
  await self._handle_callback({"updated": updates, "errored": errors, "error": error})
239
244
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nova-mvvm
3
- Version: 0.13.1
3
+ Version: 0.13.2
4
4
  Summary: A Python Package for Model-View-ViewModel pattern
5
5
  Author-email: "Yakubov, Sergey" <yakubovs@ornl.gov>
6
6
  License-Expression: MIT
@@ -15,9 +15,9 @@ nova/mvvm/pyqt6_binding/__init__.py,sha256=plms0W4kJjFpZReGOC7lE3SYX1ceGTLbdAJ1G
15
15
  nova/mvvm/pyqt6_binding/binding.py,sha256=uZNHx23Pf9DwGf3qKfQdmjOhmaXcppNd8pjkh363WP4,1365
16
16
  nova/mvvm/pyqt6_binding/pyqt6_worker.py,sha256=y8g_mfPC1xIcpyKq7ZZqxrn9Txp5gPJrsBjAwS5FHhY,2133
17
17
  nova/mvvm/trame_binding/__init__.py,sha256=uTdEW9VxtVubSbTLpoD3pC8a-KMgbKkZFlRbucvuQSE,62
18
- nova/mvvm/trame_binding/binding.py,sha256=m8B8JSYU1j5qsWSWt7Z_-JaHgwcunCONlg1E47pedxI,12030
18
+ nova/mvvm/trame_binding/binding.py,sha256=H5iTOY5FwN1UZnxPXiYmOt36hv88e_4XzyYF1NK6KH4,12255
19
19
  nova/mvvm/trame_binding/trame_worker.py,sha256=JmrneFU11Hi8TtY558R3yIWW8UGiUeVNO7HvM1uWTVs,3778
20
- nova_mvvm-0.13.1.dist-info/METADATA,sha256=v_Ne9EZCIjfnYA4jPwGcOV-cdTpcCZQU_Dladf_Y0ks,1027
21
- nova_mvvm-0.13.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
- nova_mvvm-0.13.1.dist-info/licenses/LICENSE,sha256=MOqZ8tPMKy8ZETJ2-HEvFTZ7dYNlg3gXmBkV-Y9i8bw,1061
23
- nova_mvvm-0.13.1.dist-info/RECORD,,
20
+ nova_mvvm-0.13.2.dist-info/METADATA,sha256=A5hCBiCeMxcBRB60XLsiIXt5UCjJMstF7C2eKdyVkuk,1027
21
+ nova_mvvm-0.13.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
22
+ nova_mvvm-0.13.2.dist-info/licenses/LICENSE,sha256=MOqZ8tPMKy8ZETJ2-HEvFTZ7dYNlg3gXmBkV-Y9i8bw,1061
23
+ nova_mvvm-0.13.2.dist-info/RECORD,,