pull/16/head
youngS 4 years ago
parent 6c1137afdc
commit 270e47999c
  1. 20
      fir_ser/api/migrations/0036_auto_20210409_1512.py
  2. 2
      fir_ser/api/utils/storage/caches.py

@ -0,0 +1,20 @@
# Generated by Django 3.0.3 on 2021-04-09 15:12
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0035_usercertificationinfo_reviewed_time'),
]
operations = [
migrations.AlterField(
model_name='usercertificationinfo',
name='user_id',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='certification', to=settings.AUTH_USER_MODEL, verbose_name='用户ID'),
),
]

@ -377,7 +377,7 @@ def check_user_has_all_download_times(app_obj):
user_id = app_obj.user_id_id
user_cert_obj = UserCertificationInfo.objects.filter(user_id=user_id).first()
auth_status = False
if user_cert_obj and user_cert_obj.status == 2:
if user_cert_obj and user_cert_obj.status == 1:
auth_status = True
return get_user_free_download_times(user_id, auth_status=auth_status) > 0 or check_user_can_download(user_id)

Loading…
Cancel
Save