Skip to content

Commit

Permalink
using to dict instead of asdict
Browse files Browse the repository at this point in the history
  • Loading branch information
AlxEnashi committed Oct 22, 2023
1 parent 555482d commit 1373f75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prv_candidates_step/prv_candidates_step/core/strategy/ztf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def can_parse(cls, message: dict) -> bool:
def parse(cls, message: dict, oid: str) -> dict:
message = message.copy()
message["objectId"] = oid
return asdict(cls.parse_message(message))
return cls.parse_message(message).to_dict()


class ZTFForcedPhotometryParser(SurveyParser):
Expand Down Expand Up @@ -84,7 +84,7 @@ def parse(cls, message: dict, candid: str, oid: str, ra: float, dec: float) -> d

message["ra"] = ra
message["dec"] = dec
return asdict(cls.parse_message(message))
return cls.parse_message(message).to_dict()


class ZTFNonDetectionsParser(SurveyParser):
Expand All @@ -103,7 +103,7 @@ def can_parse(cls, message: dict) -> bool:
def parse(cls, message: dict, oid: str) -> dict:
message = message.copy()
message["objectId"] = oid
return asdict(cls.parse_message(message))
return cls.parse_message(message).to_dict()


def extract_detections_and_non_detections(alert: dict) -> dict:
Expand Down

0 comments on commit 1373f75

Please sign in to comment.