🐛 Fix challenge and challenge story history data key

This commit is contained in:
xtaodada 2024-06-17 00:48:54 +08:00
parent 0955cddd7a
commit bb05dcc554
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 5 additions and 3 deletions

View File

@ -43,7 +43,8 @@ class HistoryDataAbyssServices(BaseService, HistoryDataBaseServices):
@staticmethod
def exists_data(data: HistoryData, old_data: List[HistoryData]) -> bool:
return any(d.data == data.data for d in old_data)
floors = data.data.get("abyss_data", {}).get("all_floor_detail")
return any(d.data.get("abyss_data", {}).get("all_floor_detail") == floors for d in old_data)
@staticmethod
def create(user_id: int, abyss_data: StarRailChallenge):
@ -63,7 +64,8 @@ class HistoryDataChallengeStoryServices(BaseService, HistoryDataBaseServices):
@staticmethod
def exists_data(data: HistoryData, old_data: List[HistoryData]) -> bool:
return any(d.data == data.data for d in old_data)
floors = data.data.get("story_data", {}).get("all_floor_detail")
return any(d.data.get("story_data", {}).get("all_floor_detail") == floors for d in old_data)
@staticmethod
def create(user_id: int, story_data: StarRailChallengeStory, group: StarRailChallengeStoryGroup):

@ -1 +1 @@
Subproject commit c47d04c3502deaf239c61f1c179e592d3c71aa29
Subproject commit 799471b4405a7641a8819b5269978747b17030d0