nsarchive 1.1.4__py3-none-any.whl → 1.1.6__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/__init__.py CHANGED
@@ -126,7 +126,7 @@ class EntityInstance:
126
126
  for vote in entity.votes:
127
127
  _votes.append(NSID(vote))
128
128
 
129
- self.electors.put(_votes, entity.id, expire_in = 112 * 84600) # Données supprimées après 16 semaines d'inactivité
129
+ self.electors.put({ "votes": _votes }, entity.id, expire_in = 112 * 84600) # Données supprimées après 16 semaines d'inactivité
130
130
  _base.put(_data, entity.id, expire_in = 3 * 31536000) # Pareil après 3 ans
131
131
 
132
132
  def delete_entity(self, entity: Entity) -> None:
@@ -164,6 +164,9 @@ class EntityInstance:
164
164
  for target, value in listquery.items():
165
165
  if value not in item[target]:
166
166
  _res.remove(item)
167
+
168
+ if item is None:
169
+ _res.remove(item)
167
170
 
168
171
  return [ self.get_entity(NSID(entity['key'])) for entity in _res ]
169
172
 
nsarchive/cls/entities.py CHANGED
@@ -38,6 +38,7 @@ class Position:
38
38
  self.name: str = "Inconnue"
39
39
  self.id = id
40
40
  self.permissions: PositionPermissions = PositionPermissions()
41
+
41
42
  class Entity:
42
43
  def __init__(self, id: str | NSID) -> None:
43
44
  self.id: NSID = NSID(id) # ID hexadécimal de l'entité (ou nom dans le cas de l'entreprise)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nsarchive
3
- Version: 1.1.4
3
+ Version: 1.1.6
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: happex
@@ -1,13 +1,13 @@
1
- nsarchive/__init__.py,sha256=f8N40DToL96-fLrsqaot4lTZZhCDV1vPpUEcQ9o5HX4,24637
1
+ nsarchive/__init__.py,sha256=D-TXYWBYL_8CUcvyCYoV7NlJwlXFc4JomCt6sJR8058,24729
2
2
  nsarchive/assets/default_avatar.png,sha256=n-4vG_WPke8LvbY3ZU6oA-H-OtRoIu7woKnRq9DCIlI,51764
3
3
  nsarchive/cls/archives.py,sha256=Nmt3C0Zq9oGQdCXSzm_wo70VbNq89SY3dx9KKqEpoCg,2182
4
4
  nsarchive/cls/base.py,sha256=z7NTvrtbeaUF1T_o-J7PL2N8axkmJek9EoKcQ8fTF9I,715
5
5
  nsarchive/cls/economy.py,sha256=RjFu3VzNunazslbd4Ia5p1Jr-jJP5CvIcbVOzkDTwTU,549
6
- nsarchive/cls/entities.py,sha256=zKprr9dPojzlb4X6zUNRTDLQLNYZxRILH5qDl9ps3Ak,5814
6
+ nsarchive/cls/entities.py,sha256=o5_zqkRFuXBF6zuFDsuOI8g0dxoL6rG2EUa0hj-lAhE,5816
7
7
  nsarchive/cls/exceptions.py,sha256=QN6Qn7cxTkGoC4lO50hBAq4gZCgo7scQvCkb-xKl6Xs,692
8
8
  nsarchive/cls/republic.py,sha256=6eut6OsFoOm9TVhA41fM3NlMEA3Uhg9TCuXgl46vFko,1985
9
9
  nsarchive/utils/assets.py,sha256=hd0STSpa0yT-OJlUyI_wCYXJqcBiUMQds2pZTXNNg9c,382
10
- nsarchive-1.1.4.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
11
- nsarchive-1.1.4.dist-info/METADATA,sha256=KTV3mB8WDSYhKux4Yc-Npz14lQaeQWt8GCPhV5HXxNM,5629
12
- nsarchive-1.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
13
- nsarchive-1.1.4.dist-info/RECORD,,
10
+ nsarchive-1.1.6.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
11
+ nsarchive-1.1.6.dist-info/METADATA,sha256=_t6oErLEV4SMJcgYvfgbtW9lXXsnQak8v1ipsDaTLT0,5629
12
+ nsarchive-1.1.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
13
+ nsarchive-1.1.6.dist-info/RECORD,,