Preserve the assumptions in the secr/proceedings code by isolating it from drafts now appearing in sessionpresentations. Commit ready for merge.

- Legacy-Id: 10857
This commit is contained in:
Robert Sparks 2016-02-24 22:18:38 +00:00
parent e8d40c8402
commit d17564d695
2 changed files with 6 additions and 1 deletions

View file

@ -997,7 +997,9 @@ def upload_unified(request, meeting_num, acronym=None, session_id=None):
# gather DocEvents
# include deleted material to catch deleted doc events
docs = session.materials.all()
#docs = session.materials.all()
# Don't report on draft DocEvents since the secr/materials app isn't managing them
docs = session.materials.exclude(type='draft')
docevents = DocEvent.objects.filter(doc__in=docs)
path = get_proceedings_path(meeting,group)

View file

@ -20,6 +20,9 @@ def get_materials(group,meeting):
for doc in session.materials.exclude(states__slug='deleted').order_by('order'):
if doc.type.slug in ('minutes','agenda'):
materials[doc.type.slug] = doc
elif doc.type.slug == 'draft':
continue
# drafts are currently managed directly by the session and document views
elif doc not in materials[doc.type.slug]:
materials[doc.type.slug].append(doc)
return materials