From 1f97d1dbf7ccb50c6b693042d5958055751e51b3 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 16 Apr 2020 12:56:42 +0300 Subject: [PATCH] Remove redundant gen_rev_uid. --- django_etesync/migrations/0029_auto_20200312_1849.py | 6 +++++- django_etesync/serializers.py | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/django_etesync/migrations/0029_auto_20200312_1849.py b/django_etesync/migrations/0029_auto_20200312_1849.py index 165b405..568aaa2 100644 --- a/django_etesync/migrations/0029_auto_20200312_1849.py +++ b/django_etesync/migrations/0029_auto_20200312_1849.py @@ -1,7 +1,11 @@ # Generated by Django 3.0.3 on 2020-03-12 18:49 from django.db import migrations -from django_etesync.serializers import generate_rev_uid +from django.utils.crypto import get_random_string + + +def generate_rev_uid(length=32): + return get_random_string(length) def add_collection_main_item(apps, schema_editor): diff --git a/django_etesync/serializers.py b/django_etesync/serializers.py index b2d6683..4d1bfa5 100644 --- a/django_etesync/serializers.py +++ b/django_etesync/serializers.py @@ -17,17 +17,12 @@ import base64 from django.core.files.base import ContentFile from django.contrib.auth import get_user_model from django.db import transaction -from django.utils.crypto import get_random_string from rest_framework import serializers from . import models User = get_user_model() -def generate_rev_uid(length=32): - return get_random_string(length) - - def process_revisions_for_item(item, revision_data): chunks_objs = [] chunks = revision_data.pop('chunks_relation')