mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-03-16 22:40:24 +00:00
hack to not modify meteor
This commit is contained in:
parent
d517e28e8e
commit
fa15d17e9a
1 changed files with 5 additions and 1 deletions
|
|
@ -228,8 +228,12 @@ class AleaIdField(models.CharField):
|
|||
def get_seeded_value(self, instance):
|
||||
"""Generate a syncronised value."""
|
||||
# Django model._meta is public API -> pylint: disable=W0212
|
||||
if hasattr(instance, "meteor_collection"):
|
||||
name = instance.meteor_collection
|
||||
else:
|
||||
name = instance._meta
|
||||
return meteor_random_id(
|
||||
'/collection/%s' % instance._meta, self.max_length,
|
||||
'/collection/%s' % name, self.max_length,
|
||||
)
|
||||
|
||||
def get_pk_value_on_save(self, instance):
|
||||
|
|
|
|||
Loading…
Reference in a new issue