devve1 commited on
Commit
38f4987
1 Parent(s): b2cbe33

Update ordered_multimap.py

Browse files
Files changed (1) hide show
  1. ordered_multimap.py +2 -1
ordered_multimap.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from weakref import WeakValueDictionary
2
  from collections import defaultdict
3
 
@@ -14,7 +15,7 @@ class OrderedMultiIndexMapWeakRef:
14
 
15
  def insert(self, id, text, title: str, sub_title: str):
16
  self.data.append(text)
17
- self.ids.append(id.int)
18
  self.index_list.append(WeakValueDictionary({'title': StringWrapper(title), 'sub_title': StringWrapper(sub_title)}))
19
 
20
  def all_ids(self):
 
1
+ import uuid
2
  from weakref import WeakValueDictionary
3
  from collections import defaultdict
4
 
 
15
 
16
  def insert(self, id, text, title: str, sub_title: str):
17
  self.data.append(text)
18
+ self.ids.append(int(uuid.UUID(id)))
19
  self.index_list.append(WeakValueDictionary({'title': StringWrapper(title), 'sub_title': StringWrapper(sub_title)}))
20
 
21
  def all_ids(self):