diff options
-rw-r--r-- | blocks/authAPI/views.py | 4 | ||||
-rw-r--r-- | blocks/blocks/settings.py | 2 | ||||
-rw-r--r-- | blocks/simulationAPI/helpers/scilab_manager.py | 3 | ||||
-rw-r--r-- | blocks/xcos2xml/blocks/TEXT_f.xsl | 7 |
4 files changed, 8 insertions, 8 deletions
diff --git a/blocks/authAPI/views.py b/blocks/authAPI/views.py index e1cc173b..49dbdac2 100644 --- a/blocks/authAPI/views.py +++ b/blocks/authAPI/views.py @@ -10,7 +10,6 @@ from django.http import HttpResponseNotFound from djoser import utils from djoser.serializers import TokenSerializer from authAPI.serializers import TokenCreateSerializer -from blocks.settings import DOMAIN Token = djoser_settings.TOKEN_MODEL @@ -50,8 +49,7 @@ def get_social_user(email, request, callback, service): user.save() token, created = Token.objects.get_or_create(user=user) - protocol = 'https://' if request.is_secure() else 'http://' - web_url = protocol + DOMAIN + '/#/dashboard' + web_url = settings.POST_ACTIVATE_REDIRECT_URL + '#/dashboard' return render(request, callback, {'token': token, diff --git a/blocks/blocks/settings.py b/blocks/blocks/settings.py index 40dc5a11..aba1009f 100644 --- a/blocks/blocks/settings.py +++ b/blocks/blocks/settings.py @@ -155,8 +155,6 @@ GITHUB_OAUTH_REDIRECT_URI = os.environ.get('GITHUB_OAUTH_REDIRECT_URI', 'http://localhost/api/auth/github-callback') POST_ACTIVATE_REDIRECT_URL = os.environ.get('POST_ACTIVATE_REDIRECT_URL', 'http://localhost/') -DOMAIN = os.environ.get('EMAIL_DOMAIN', 'localhost') -SITE_NAME = os.environ.get('EMAIL_SITE_NAME', 'Xcos') DJOSER = { 'LOGIN_FIELD': 'email', diff --git a/blocks/simulationAPI/helpers/scilab_manager.py b/blocks/simulationAPI/helpers/scilab_manager.py index ce420eee..528cda5d 100644 --- a/blocks/simulationAPI/helpers/scilab_manager.py +++ b/blocks/simulationAPI/helpers/scilab_manager.py @@ -86,8 +86,7 @@ def secure_filename(filename: str) -> str: def makedirs(dirname, dirtype=None): - if not exists(dirname): - os.makedirs(dirname) + os.makedirs(dirname, exist_ok=True) def rmdir(dirname, dirtype=None): diff --git a/blocks/xcos2xml/blocks/TEXT_f.xsl b/blocks/xcos2xml/blocks/TEXT_f.xsl index 72e5ca91..9c0ee871 100644 --- a/blocks/xcos2xml/blocks/TEXT_f.xsl +++ b/blocks/xcos2xml/blocks/TEXT_f.xsl @@ -7,7 +7,12 @@ <xsl:variable name="commandPorts">0</xsl:variable> <xsl:element name="mxCell"> <xsl:attribute name="style"> - <xsl:value-of select="@style" /> + <xsl:choose> + <xsl:when test="@style != ''"> + <xsl:value-of select="@style" /> + </xsl:when> + <xsl:otherwise>TEXT_f</xsl:otherwise> + </xsl:choose> </xsl:attribute> <xsl:attribute name="id"> <xsl:value-of select="@id" /> |