Commit 32a870c7 authored by Guillaume Mella's avatar Guillaume Mella
Browse files

always provide validated entries

parent 3a9d2374
from pyramid.response import Response
from pyramid.view import view_config
from sqlalchemy.exc import DBAPIError
from jmdc_app.models.star_info import StarInfo
from jmdc_app.models.submission import StarInfoEntry
@view_config(route_name='jmdc_export_csv', renderer='../templates/jmdc_export_csv.jinja2')
def jmdc_export_csv(request):
......@@ -10,6 +9,8 @@ def jmdc_export_csv(request):
session = request.dbsession
request.response.content_type = 'text/plain'
stars = session.query(StarInfo).all()
# order by id (creation order / look during import ) and check for validated ones
stars = session.query(StarInfo).filter(StarInfo.star_info_entry.any(StarInfoEntry.validated == True)).order_by(
return { 'stars': stars }
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 to comment