From 8453d688f6e5edc2e3c786a1eb6ccca516a62ac9 Mon Sep 17 00:00:00 2001 From: Kálmán Viktor <kviktor@cloud.bme.hu> Date: Thu, 31 Jul 2014 15:43:24 +0200 Subject: [PATCH] dashboard: store quick fixes fix typo handle NoStoreException (this shouldn't really happen) --- circle/dashboard/templates/dashboard/store/upload.html | 2 +- circle/dashboard/views.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/circle/dashboard/templates/dashboard/store/upload.html b/circle/dashboard/templates/dashboard/store/upload.html index 795ae6c..13ab887 100644 --- a/circle/dashboard/templates/dashboard/store/upload.html +++ b/circle/dashboard/templates/dashboard/store/upload.html @@ -19,7 +19,7 @@ <div class="panel-body"> <div style="text-align: center; margin: 0 0 20px 0;"> <div class="label label-info" style="padding: 5px;"> - {% trans "Curently uploading to" %}: {{ directory }} + {% trans "Currently uploading to" %}: {{ directory }} </div> </div> <form method="POST" action="{{ action }}" enctype="multipart/form-data"> diff --git a/circle/dashboard/views.py b/circle/dashboard/views.py index 33a1425..1fca85b 100644 --- a/circle/dashboard/views.py +++ b/circle/dashboard/views.py @@ -87,7 +87,7 @@ from storage.models import Disk from firewall.models import Vlan, Host, Rule from .models import Favourite, Profile, GroupProfile, FutureMember -from .store_api import Store, NoStoreException +from .store_api import Store, NoStoreException, NotOkException logger = logging.getLogger(__name__) saml_available = hasattr(settings, "SAML_CONFIG") @@ -3153,6 +3153,11 @@ class StoreList(LoginRequiredMixin, TemplateView): except NoStoreException: messages.warning(self.request, _("No store.")) return redirect("/") + except NotOkException: + messages.warning(self.request, _("Store has some problems now." + " Try again later.")) + return redirect("/") + def create_up_directory(self, directory): path = normpath(join('/', directory, '..')) -- libgit2 0.26.0