Commit ab578212 authored by Giannis Tsapelas's avatar Giannis Tsapelas
Browse files

bug fixes

parent 883999c8
......@@ -9,6 +9,20 @@ from datetime import datetime
import traceback
def get_datatype(datatype):
if datatype == 'int':
return 'INT'
if datatype == 'double':
return 'FLOAT'
if datatype == 'dateTime':
return 'TIMESTAMP'
if datatype == 'string':
return 'STRING'
if datatype == 'int':
return 'INT'
return '-'
def parse_field(f):
print(f.keys())
name = f['label']
......@@ -24,7 +38,10 @@ def parse_field(f):
datatype = f['range'].split('#')[1]
else:
datatype = '-'
return({'name': name, 'unit': unit, 'description': description, 'datatype': datatype})
datatype_correct = get_datatype(datatype)
return({'name': name, 'unit': unit, 'description': description, 'datatype': datatype_correct})
def parse_item(profile, item, path):
......@@ -149,6 +166,8 @@ class Command(BaseCommand):
for key in keys_to_look:
setattr(dataset, key, obj[key])
dataset.stored_at = 'CYBELE_LXS'
dataset.save()
# new_vars = list()
......
# pull official base image
FROM python:3.8-alpine
# FROM python:3.8-alpine
FROM python:3.7-alpine3.13
# set work directory
WORKDIR /usr/src/cybele_advanced_query_builder
......
......@@ -14,8 +14,8 @@ done
echo "PostgreSQL started"
echo "Copying new Keycloak client and views"
cp -rf client.py /usr/local/lib/python3.8/site-packages/keycloak/
cp -rf views.py /usr/local/lib/python3.8/site-packages/django_keycloak/
cp -rf client.py /usr/local/lib/python3.7/site-packages/keycloak/
cp -rf views.py /usr/local/lib/python3.7/site-packages/django_keycloak/
echo "Migrating..."
python manage.py migrate --noinput
......@@ -23,6 +23,9 @@ python manage.py migrate --noinput
# echo "Importing initial data"
# python manage.py loaddata datasets.json
echo "Collecting the datasets..."
python manage.py collect_datasets_and_metadata
echo "Setting up Keycloak"
python manage.py setup_keycloak
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment