nsarchive 2.0.0a6__py3-none-any.whl → 2.0.0a7__py3-none-any.whl
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.
- nsarchive/instances/_economy.py +1 -1
- nsarchive/instances/_entities.py +15 -3
- nsarchive/instances/_republic.py +5 -5
- {nsarchive-2.0.0a6.dist-info → nsarchive-2.0.0a7.dist-info}/METADATA +1 -1
- {nsarchive-2.0.0a6.dist-info → nsarchive-2.0.0a7.dist-info}/RECORD +7 -7
- {nsarchive-2.0.0a6.dist-info → nsarchive-2.0.0a7.dist-info}/LICENSE +0 -0
- {nsarchive-2.0.0a6.dist-info → nsarchive-2.0.0a7.dist-info}/WHEEL +0 -0
nsarchive/instances/_economy.py
CHANGED
nsarchive/instances/_entities.py
CHANGED
@@ -167,8 +167,20 @@ class EntityInstance(Instance):
|
|
167
167
|
- `list[Entity | User | Organization]`
|
168
168
|
"""
|
169
169
|
|
170
|
-
|
171
|
-
|
170
|
+
if "_type" in query.keys():
|
171
|
+
if query["_type"] == "individual":
|
172
|
+
del query["_type"]
|
173
|
+
_res = self.fetch('individuals', **query)
|
174
|
+
elif query["_type"] == "organization":
|
175
|
+
del query["_type"]
|
176
|
+
_res = self.fetch('organizations', **query)
|
177
|
+
else:
|
178
|
+
del query["_type"]
|
179
|
+
_res = self.fetch('individuals', **query)
|
180
|
+
_res.extend(self.fetch('organizations', **query))
|
181
|
+
else:
|
182
|
+
_res = self.fetch('individuals', **query)
|
183
|
+
_res.extend(self.fetch('organizations', **query))
|
172
184
|
|
173
185
|
return [ self.get_entity(NSID(entity['id'])) for entity in _res if entity is not None ]
|
174
186
|
|
@@ -247,7 +259,7 @@ class EntityInstance(Instance):
|
|
247
259
|
elif type(archive) == Report:
|
248
260
|
_data['_type'] = "report"
|
249
261
|
else:
|
250
|
-
_data['_type'] = "
|
262
|
+
_data['_type'] = "action"
|
251
263
|
|
252
264
|
self._put_in_db('archives', _data)
|
253
265
|
|
nsarchive/instances/_republic.py
CHANGED
@@ -14,8 +14,8 @@ class RepublicInstance(Instance):
|
|
14
14
|
Gère les interactions avec les votes, les archives de la république, et les fonctionnaires.
|
15
15
|
|
16
16
|
## Informations
|
17
|
-
- Résultats des votes: `.Vote | .
|
18
|
-
- Différentes institutions: `.
|
17
|
+
- Résultats des votes et procès: `.Vote | .Referendum | .Lawsuit`
|
18
|
+
- Différentes institutions: `.State | .Administration | .Government | .Assembly | .Court | .PoliceForces`
|
19
19
|
- Occupants des différents rôles et historique de leurs actions: `.Official`
|
20
20
|
"""
|
21
21
|
|
@@ -35,7 +35,7 @@ class RepublicInstance(Instance):
|
|
35
35
|
ID du vote.
|
36
36
|
|
37
37
|
## Renvoie
|
38
|
-
- `.Vote | .
|
38
|
+
- `.Vote | .Referendum | .Lawsuit`
|
39
39
|
"""
|
40
40
|
|
41
41
|
id = NSID(id)
|
@@ -60,7 +60,7 @@ class RepublicInstance(Instance):
|
|
60
60
|
|
61
61
|
return vote
|
62
62
|
|
63
|
-
def save_vote(self, vote: Vote | Referendum) -> None:
|
63
|
+
def save_vote(self, vote: Vote | Referendum | Lawsuit) -> None:
|
64
64
|
"""Sauvegarde un vote dans la base de données."""
|
65
65
|
|
66
66
|
vote.id = NSID(vote.id)
|
@@ -222,7 +222,7 @@ class RepublicInstance(Instance):
|
|
222
222
|
elif type(archive) == Demotion:
|
223
223
|
_data['_type'] = "demotion"
|
224
224
|
else:
|
225
|
-
_data['_type'] = "
|
225
|
+
_data['_type'] = "action"
|
226
226
|
|
227
227
|
self._put_in_db('archives', _data)
|
228
228
|
self._put_in_db('mandate', _data) # Ajouter les archives à celle du mandat actuel
|
@@ -6,11 +6,11 @@ nsarchive/cls/economy.py,sha256=fnzmliHsUBEdu5RrrSkimpcgou_HFnivP_lmzLKCaDI,1360
|
|
6
6
|
nsarchive/cls/entities.py,sha256=hjqCtsQHQZrLFwR57d_n4FssJ53-jdniQMHUAJGuDPY,6612
|
7
7
|
nsarchive/cls/exceptions.py,sha256=QN6Qn7cxTkGoC4lO50hBAq4gZCgo7scQvCkb-xKl6Xs,692
|
8
8
|
nsarchive/cls/republic.py,sha256=4amjvCS5BnrvEgbjjDx_tOit3TbOSCMTsns6ifceL_8,2464
|
9
|
-
nsarchive/instances/_economy.py,sha256=
|
10
|
-
nsarchive/instances/_entities.py,sha256=
|
11
|
-
nsarchive/instances/_republic.py,sha256=
|
9
|
+
nsarchive/instances/_economy.py,sha256=7p1Ofu17hhuN2RWVWxwA28EDlMP8sAueT3bCOVlvRsY,7444
|
10
|
+
nsarchive/instances/_entities.py,sha256=zu0ZaKXKCEFv6DNQiRkk13CufHyEYAi3Bx9LaYJ6tkc,10346
|
11
|
+
nsarchive/instances/_republic.py,sha256=5-6XjPWNcR8sHxm1ipWlQXUIi-UKmfo2OHir9QSQvWM,10106
|
12
12
|
nsarchive/utils/assets.py,sha256=WGC03K1VZ5LwGzcVXbqphtGBZ_Vjso-1hmbIkpgL_X8,382
|
13
|
-
nsarchive-2.0.
|
14
|
-
nsarchive-2.0.
|
15
|
-
nsarchive-2.0.
|
16
|
-
nsarchive-2.0.
|
13
|
+
nsarchive-2.0.0a7.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
|
14
|
+
nsarchive-2.0.0a7.dist-info/METADATA,sha256=wysDMQVOMEo3d23n2HkSAyd8DFUmHjd36DKow8REQF8,5697
|
15
|
+
nsarchive-2.0.0a7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
16
|
+
nsarchive-2.0.0a7.dist-info/RECORD,,
|
File without changes
|
File without changes
|