aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/authentication_tools.py6
-rw-r--r--wqflask/wqflask/views.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py
index ece7022c..3553b92b 100644
--- a/wqflask/utility/authentication_tools.py
+++ b/wqflask/utility/authentication_tools.py
@@ -76,8 +76,10 @@ def add_new_resource(dataset, trait_id=None):
def get_group_code(dataset):
results = g.db.execute("SELECT InbredSetCode from InbredSet where Name='{}'".format(dataset.group.name)).fetchone()
-
- return results[0]
+ if results[0]:
+ return results[0]
+ else:
+ return ""
def check_admin(resource_id=None):
the_url = "http://localhost:8080/available?resource={}&user={}".format(resource_id, g.user_session.user_id)
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index a898de43..91d1a279 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -419,7 +419,7 @@ def export_traits_csv():
if len(file_list) > 1:
now = datetime.datetime.now()
time_str = now.strftime('%H:%M_%d%B%Y')
- filename = "collection_{}".format(time_str)
+ filename = "export_{}".format(time_str)
memory_file = StringIO.StringIO()
with ZipFile(memory_file, mode='w', compression=ZIP_DEFLATED) as zf:
for the_file in file_list: