Fixed achievement server filter #1.1.0.rc2
This commit is contained in:
		@@ -108,6 +108,15 @@ class Achievement(TableABC):
 | 
			
		||||
        """
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    def get_select_by_server_id_string(id: int) -> str:
 | 
			
		||||
        return str(
 | 
			
		||||
            f"""
 | 
			
		||||
            SELECT * FROM `Achievements`
 | 
			
		||||
            WHERE `ServerId` = {id};
 | 
			
		||||
        """
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def insert_string(self) -> str:
 | 
			
		||||
        return str(
 | 
			
		||||
 
 | 
			
		||||
@@ -65,8 +65,8 @@ class AchievementRepositoryService(AchievementRepositoryABC):
 | 
			
		||||
 | 
			
		||||
    def get_achievements_by_server_id(self, server_id: int) -> List[Achievement]:
 | 
			
		||||
        achievements = List(Achievement)
 | 
			
		||||
        self._logger.trace(__name__, f"Send SQL command: {Achievement.get_select_by_id_string(server_id)}")
 | 
			
		||||
        results = self._context.select(Achievement.get_select_all_string())
 | 
			
		||||
        self._logger.trace(__name__, f"Send SQL command: {Achievement.get_select_by_server_id_string(server_id)}")
 | 
			
		||||
        results = self._context.select(Achievement.get_select_by_server_id_string(server_id))
 | 
			
		||||
        for result in results:
 | 
			
		||||
            self._logger.trace(__name__, f"Get user with id {result[0]}")
 | 
			
		||||
            achievements.append(self._from_result(result))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user