diff --git a/fladgejt/webui/studium.py b/fladgejt/webui/studium.py
index 8cde0df..420e0a9 100644
--- a/fladgejt/webui/studium.py
+++ b/fladgejt/webui/studium.py
@@ -255,14 +255,13 @@ def get_roky_studia_noveho_zapisneho_listu(self, studium_key):
return options
- def create_zapisny_list(self, studium_key, akademicky_rok, rok_studia):
+ def create_zapisny_list(self, studium_key, akademicky_rok):
'''Creates enrollment list.
Args:
studium_key: studium identifier
akademicky_rok: Academic year of the time range in the form of
'start/end'. E.g. '2013/2014'. (optional)
- rok_studia: year of the study
'''
app = self._open_administracia_studia()
@@ -270,10 +269,13 @@ def create_zapisny_list(self, studium_key, akademicky_rok, rok_studia):
message = None
+ rok_studia = max(list(map(lambda a : a.id ,app.d.rocnikComboBox.options)))
+
# V combo boxe vyberieme rok studia.
if rok_studia is not None:
app.d.rocnikComboBox.select(find_option(app.d.rocnikComboBox.options, id=str(rok_studia)))
+
# Ak je nastaveny akademicky rok, vyberieme ho v combo boxe.
if akademicky_rok is not None:
try:
diff --git a/votrfront/js/PrehladStudiaPage.js b/votrfront/js/PrehladStudiaPage.js
index 4284bd1..8411401 100644
--- a/votrfront/js/PrehladStudiaPage.js
+++ b/votrfront/js/PrehladStudiaPage.js
@@ -73,6 +73,7 @@ export function PridatZapisnyListButton (props) {
var studium = props.studium;
var cache = new CacheRequester();
var zapisne_listy = cache.get('get_zapisne_listy', studium.studium_key);
+
if (!cache.loadedAll) {
return ;
}
@@ -86,10 +87,11 @@ export function PridatZapisnyListButton (props) {
} else { // ak studium prebieha a nemame este zapisny list na tento rok
return
+ else {RequestCache.invalidate('get_zapisne_listy');}})}
+ }}
+ className='btn btn-xs btn-success'>Vytvoriť
}
} else { // ak studium uz skoncilo
return null;