Exemplo n.º 1
0
    def get_generated_document(self):
        document_id = self.request.get('document-id')
        if not document_id:
            raise NotFound

        document = GeneratedProtocol.get(document_id)
        if not document:
            raise NotFound

        return document
Exemplo n.º 2
0
    def get_generated_document(self):
        document_id = self.request.get('document-id')
        if not document_id:
            raise NotFound

        document = GeneratedProtocol.get(document_id)
        if not document:
            raise NotFound

        return document
Exemplo n.º 3
0
 def test_has_protocol_document(self):
     self.assertFalse(self.meeting.has_protocol_document())
     self.meeting.protocol_document = GeneratedProtocol(
         admin_unit_id='foo', int_id=1, generated_version=42)
     self.assertTrue(self.meeting.has_protocol_document())
Exemplo n.º 4
0
 def get_related_meeting_from_protocol(self):
     oguid = Oguid.for_object(self.context)
     protocol = GeneratedProtocol.get_one(oguid=oguid)
     return protocol.meeting
Exemplo n.º 5
0
 def get_related_meeting_from_protocol(self):
     oguid = Oguid.for_object(self.context)
     protocol = GeneratedProtocol.get_one(oguid=oguid)
     return protocol.meeting