missing_migrations #437
@ -0,0 +1,25 @@
|
|||||||
|
# Generated by Django 5.0.8 on 2024-08-26 16:47
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('codelist', '0002_migrate_975_to_288'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='konovacode',
|
||||||
|
name='long_name',
|
||||||
|
field=models.CharField(blank=True, default="", max_length=1000),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='konovacode',
|
||||||
|
name='short_name',
|
||||||
|
field=models.CharField(blank=True, default="", help_text='Short version of long name', max_length=500),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 5.0.8 on 2024-08-26 16:47
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('codelist', '0003_alter_konovacode_long_name_and_more'),
|
||||||
|
('compensation', '0015_alter_compensation_after_states_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='compensationstate',
|
||||||
|
name='biotope_type_details',
|
||||||
|
field=models.ManyToManyField(blank=True, limit_choices_to={'code_lists__in': [288], 'is_archived': False, 'is_selectable': True}, related_name='+', to='codelist.konovacode'),
|
||||||
|
),
|
||||||
|
]
|
@ -55,11 +55,11 @@ class ParcelFetcher:
|
|||||||
content = json.loads(response.content.decode("utf-8"))
|
content = json.loads(response.content.decode("utf-8"))
|
||||||
except JSONDecodeError:
|
except JSONDecodeError:
|
||||||
content = {}
|
content = {}
|
||||||
next = content.get("next", None)
|
_next = content.get("next", None)
|
||||||
fetched_parcels = content.get("results", [])
|
fetched_parcels = content.get("results", [])
|
||||||
self.results += fetched_parcels
|
self.results += fetched_parcels
|
||||||
|
|
||||||
if next:
|
if _next:
|
||||||
self.get_parcels(next)
|
self.get_parcels(_next)
|
||||||
|
|
||||||
return self.results
|
return self.results
|
@ -35,9 +35,9 @@ class PropagateUserView(View):
|
|||||||
def post(self, request: HttpRequest, *args, **kwargs):
|
def post(self, request: HttpRequest, *args, **kwargs):
|
||||||
# Decrypt
|
# Decrypt
|
||||||
encrypted_body = request.body
|
encrypted_body = request.body
|
||||||
hash = hashlib.md5()
|
_hash = hashlib.md5()
|
||||||
hash.update(OAUTH_CLIENT_ID.encode("utf-8"))
|
_hash.update(OAUTH_CLIENT_ID.encode("utf-8"))
|
||||||
key = base64.urlsafe_b64encode(hash.hexdigest().encode("utf-8"))
|
key = base64.urlsafe_b64encode(_hash.hexdigest().encode("utf-8"))
|
||||||
fernet = Fernet(key)
|
fernet = Fernet(key)
|
||||||
body = fernet.decrypt(encrypted_body).decode("utf-8")
|
body = fernet.decrypt(encrypted_body).decode("utf-8")
|
||||||
body = json.loads(body)
|
body = json.loads(body)
|
||||||
|
Loading…
Reference in New Issue
Block a user