Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
kessler-frost committed Oct 13, 2023
1 parent 3262dfb commit b487f58
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions covalent/_results_manager/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _update_node(
sublattice_result: "Result" = None,
stdout: str = None,
stderr: str = None,
qelectron_data_exists: bool = False,
qelectron_data_exists: bool = None,
) -> None:
"""
Update the node result in the transport graph.
Expand Down Expand Up @@ -501,7 +501,7 @@ def _update_node(
if stderr is not None:
self.lattice.transport_graph.set_node_value(node_id, "stderr", stderr)

if qelectron_data_exists:
if qelectron_data_exists is not None:
self.lattice.transport_graph.set_node_value(
node_id, "qelectron_data_exists", qelectron_data_exists
)
Expand Down
4 changes: 2 additions & 2 deletions covalent/_shared_files/schemas/electron.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""FastAPI models for /api/v1/resultv2 endpoints"""

from datetime import datetime
from typing import Dict, Optional, Union
from typing import Dict, Optional

from pydantic import BaseModel, validator

Expand Down Expand Up @@ -97,7 +97,7 @@ class ElectronMetadata(BaseModel):
name: str
executor: str
executor_data: dict
qelectron_data_exists: Union[None, bool]
qelectron_data_exists: bool
sub_dispatch_id: Optional[str] = None
status: StatusEnum
start_time: Optional[datetime] = None
Expand Down
2 changes: 1 addition & 1 deletion covalent/_workflow/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def encode_metadata(metadata: dict) -> dict:
encoded_metadata["triggers"] = metadata["triggers"]

# qelectron_data_exists
encoded_metadata["qelectron_data_exists"] = None
encoded_metadata["qelectron_data_exists"] = False

return encoded_metadata

Expand Down
2 changes: 1 addition & 1 deletion covalent_dispatcher/_db/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _node(
stderr: str = None,
sub_dispatch_id=None,
sublattice_result=None,
qelectron_data_exists: bool = False,
qelectron_data_exists: bool = None,
) -> bool:
"""
Update the node result in the transport graph.
Expand Down
2 changes: 1 addition & 1 deletion covalent_ui/api/v1/database/schema/electron.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Electron(Base):
cancel_requested = Column(Boolean, nullable=False, default=False)

# Flag that indicates if qelectron data exists in the electron
qelectron_data_exists = Column(Boolean, nullable=False)
qelectron_data_exists = Column(Boolean, nullable=False, default=False)

# Timestamps
created_at = Column(DateTime, nullable=False, server_default=func.now())
Expand Down

0 comments on commit b487f58

Please sign in to comment.