Compare commits

..

No commits in common. "45441cc44dbb11930606d77540ac1e59473d9cbc" and "e47eda385d1c94a3ec7706cd27b12ffd5fb083fe" have entirely different histories.

4 changed files with 6 additions and 50 deletions

View File

@ -1,25 +0,0 @@
# 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,
),
]

View File

@ -1,19 +0,0 @@
# 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'),
),
]

View File

@ -55,11 +55,11 @@ class ParcelFetcher:
content = json.loads(response.content.decode("utf-8"))
except JSONDecodeError:
content = {}
_next = content.get("next", None)
next = content.get("next", None)
fetched_parcels = content.get("results", [])
self.results += fetched_parcels
if _next:
self.get_parcels(_next)
if next:
self.get_parcels(next)
return self.results

View File

@ -35,9 +35,9 @@ class PropagateUserView(View):
def post(self, request: HttpRequest, *args, **kwargs):
# Decrypt
encrypted_body = request.body
_hash = hashlib.md5()
_hash.update(OAUTH_CLIENT_ID.encode("utf-8"))
key = base64.urlsafe_b64encode(_hash.hexdigest().encode("utf-8"))
hash = hashlib.md5()
hash.update(OAUTH_CLIENT_ID.encode("utf-8"))
key = base64.urlsafe_b64encode(hash.hexdigest().encode("utf-8"))
fernet = Fernet(key)
body = fernet.decrypt(encrypted_body).decode("utf-8")
body = json.loads(body)