nsarchive 2.0.0a5__tar.gz → 2.0.0a6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nsarchive
3
- Version: 2.0.0a5
3
+ Version: 2.0.0a6
4
4
  Summary: API-wrapper pour récupérer des données liées à Nation
5
5
  License: GPL-3.0
6
6
  Author: happex
@@ -113,12 +113,13 @@ class Instance:
113
113
 
114
114
  for key, value in query.items():
115
115
  entity = self._select_from_db(table, key, value)
116
- if entity is not None: matches.append(entity[0])
117
116
 
118
- _res = []
117
+ if entity is not None:
118
+ matches.append(entity)
119
119
 
120
- for item in matches:
121
- if all(item in sublist for sublist in matches[1:]):
122
- _res.append(item)
120
+ if not matches or len(matches) != len(query):
121
+ return []
123
122
 
124
- return _res
123
+ _res = [ item for item in matches[0] if all(item in match for match in matches[1:]) ]
124
+
125
+ return _res
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "nsarchive"
3
- version = "2.0.0-alpha.5"
3
+ version = "2.0.0-alpha.6"
4
4
  description = "API-wrapper pour récupérer des données liées à Nation"
5
5
  authors = ["happex <110610727+okayhappex@users.noreply.github.com>"]
6
6
  license = "GPL-3.0"
File without changes
File without changes