nsarchive 0.0.3a0__py3-none-any.whl → 0.0.5a0__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
@@ -55,7 +55,7 @@ class EntityInstance:
55
55
  }
56
56
 
57
57
  if type(entity) == Organization:
58
- _data['owner_id'] = entity.owner.id.upper() if entity.owner else Entity("0")
58
+ _data['owner_id'] = entity.owner.upper() if entity.owner else "0"
59
59
  _data['members'] = [ member.id.upper() for member in entity.members ] if entity.members else []
60
60
  _data['certifications'] = entity.certifications
61
61
  elif type(entity) == User:
@@ -68,7 +68,8 @@ class EntityInstance:
68
68
  _data = self.electors.get(id)
69
69
 
70
70
  if _data is None:
71
- return Elector('0')
71
+ self.save_elector(Elector(id))
72
+ return Elector(id)
72
73
 
73
74
  elector = Elector(id)
74
75
  elector.votes = _data['votes']
nsarchive/cls/votes.py CHANGED
@@ -7,7 +7,7 @@ class Vote:
7
7
  self.id: str = id
8
8
  self.title: str = title
9
9
  self.choices = { choice : 0 for choice in choices }
10
- self.author: FunctionalUser
10
+ self.author: str = "0"
11
11
  self.startDate: int = 0
12
12
  self.endDate: int = 0
13
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nsarchive
3
- Version: 0.0.3a0
3
+ Version: 0.0.5a0
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: happex
@@ -0,0 +1,8 @@
1
+ nsarchive/__init__.py,sha256=f6avf_TRSHQklWkFGRSJzNtyDNWnCutnjiBIiWBlYq4,4610
2
+ nsarchive/cls/entities.py,sha256=mhBHZBtYK1E2dfTDoFHNdw1uu5QsnOc-Utuu5EjtV7c,2556
3
+ nsarchive/cls/exceptions.py,sha256=TrH9PvHhVZi7wap9ZfBLGRWJY3OBCYgWAMnco5uadYY,420
4
+ nsarchive/cls/votes.py,sha256=qaWVgfhk5GBccilFSwoZ0E9qE--IX_3HuOBoQAHD2jA,502
5
+ nsarchive-0.0.5a0.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
6
+ nsarchive-0.0.5a0.dist-info/METADATA,sha256=kDdN3hsmA4jI-otKdw4KTebT1z2LctPdvFD3qM7W66s,5554
7
+ nsarchive-0.0.5a0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
8
+ nsarchive-0.0.5a0.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- nsarchive/__init__.py,sha256=mKnfVVY41oEfjh-gkL860tywi8FDL7kRXO5HCD-XDZ4,4578
2
- nsarchive/cls/entities.py,sha256=mhBHZBtYK1E2dfTDoFHNdw1uu5QsnOc-Utuu5EjtV7c,2556
3
- nsarchive/cls/exceptions.py,sha256=TrH9PvHhVZi7wap9ZfBLGRWJY3OBCYgWAMnco5uadYY,420
4
- nsarchive/cls/votes.py,sha256=vASgf9ies8YPPlKBoaQdB5jB_Sp4GS_Onl8hv3_7HJU,507
5
- nsarchive-0.0.3a0.dist-info/LICENSE,sha256=aFLFZg6LEJFpTlNQ8su3__jw4GfV-xWBmC1cePkKZVw,35802
6
- nsarchive-0.0.3a0.dist-info/METADATA,sha256=nJnkIRkuUHsXrpJHulVjkkk2oL6rsGUaZJ_EYuaQAY8,5554
7
- nsarchive-0.0.3a0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
8
- nsarchive-0.0.3a0.dist-info/RECORD,,