Commit 8453d688 by Kálmán Viktor

dashboard: store quick fixes

fix typo
handle NoStoreException (this shouldn't really happen)
parent a29ad2f0
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="panel-body"> <div class="panel-body">
<div style="text-align: center; margin: 0 0 20px 0;"> <div style="text-align: center; margin: 0 0 20px 0;">
<div class="label label-info" style="padding: 5px;"> <div class="label label-info" style="padding: 5px;">
{% trans "Curently uploading to" %}: {{ directory }} {% trans "Currently uploading to" %}: {{ directory }}
</div> </div>
</div> </div>
<form method="POST" action="{{ action }}" enctype="multipart/form-data"> <form method="POST" action="{{ action }}" enctype="multipart/form-data">
......
...@@ -87,7 +87,7 @@ from storage.models import Disk ...@@ -87,7 +87,7 @@ from storage.models import Disk
from firewall.models import Vlan, Host, Rule from firewall.models import Vlan, Host, Rule
from .models import Favourite, Profile, GroupProfile, FutureMember from .models import Favourite, Profile, GroupProfile, FutureMember
from .store_api import Store, NoStoreException from .store_api import Store, NoStoreException, NotOkException
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
saml_available = hasattr(settings, "SAML_CONFIG") saml_available = hasattr(settings, "SAML_CONFIG")
...@@ -3153,6 +3153,11 @@ class StoreList(LoginRequiredMixin, TemplateView): ...@@ -3153,6 +3153,11 @@ class StoreList(LoginRequiredMixin, TemplateView):
except NoStoreException: except NoStoreException:
messages.warning(self.request, _("No store.")) messages.warning(self.request, _("No store."))
return redirect("/") return redirect("/")
except NotOkException:
messages.warning(self.request, _("Store has some problems now."
" Try again later."))
return redirect("/")
def create_up_directory(self, directory): def create_up_directory(self, directory):
path = normpath(join('/', directory, '..')) path = normpath(join('/', directory, '..'))
......
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 sign in to comment