diff --git a/mapadroid/db/DbPogoProtoSubmitRaw.py b/mapadroid/db/DbPogoProtoSubmitRaw.py index 7b9661177..fb0f64ae5 100644 --- a/mapadroid/db/DbPogoProtoSubmitRaw.py +++ b/mapadroid/db/DbPogoProtoSubmitRaw.py @@ -714,7 +714,7 @@ async def quest(self, session: AsyncSession, quest_proto: pogoprotos.FortSearchO condition: RepeatedCompositeFieldContainer[pogoprotos.QuestConditionProto] = goal.condition # TODO: Json dumping protos... - json_condition: str = json.dumps(condition) + json_condition: str = ProtoHelper.to_json(condition) task = await quest_gen.questtask(int(quest_type), json_condition, int(target), quest_template, quest_title_resource_id) quest: Optional[TrsQuest] = await TrsQuestHelper.get(session, fort_id, quest_layer) diff --git a/mapadroid/worker/strategy/quest/QuestStrategy.py b/mapadroid/worker/strategy/quest/QuestStrategy.py index d24cec253..e12273010 100644 --- a/mapadroid/worker/strategy/quest/QuestStrategy.py +++ b/mapadroid/worker/strategy/quest/QuestStrategy.py @@ -578,11 +578,11 @@ async def _ensure_stop_present(self, timestamp: float) -> PositionStopType: async def _current_position_has_spinnable_stop(self, timestamp: float) -> PositionStopType: type_received, data_received, time_received = await self._wait_for_data_after_moving(timestamp, ProtoIdentifier.GMO, 35) - if (type_received != ReceivedType.GMO or data_received is None - or not isinstance(data_received, pogoprotos.GetMapObjectsOutProto)): + if type_received != ReceivedType.GMO or data_received is None: await self._spinnable_data_failure() return PositionStopType.GMO_NOT_AVAILABLE - latest_proto: pogoprotos.GetMapObjectsOutProto = data_received + + latest_proto: pogoprotos.GetMapObjectsOutProto = ProtoHelper.parse(ProtoIdentifier.GMO, data_received) if not latest_proto.map_cell: logger.warning("Can't spin stop - no map info in GMO!")