~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/blueprints/model/specificationmessage.py

  • Committer: Steve Kowalik
  • Date: 2011-08-07 04:05:52 UTC
  • mto: This revision was merged to the branch mainline in revision 13626.
  • Revision ID: stevenk@ubuntu.com-20110807040552-mwnxo0flmhvl35e8
Correct the notification based on review comments, and remove request{,ed}
from the function names, switching to create{,d}.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
__metaclass__ = type
13
13
    BoolCol,
14
14
    ForeignKey,
15
15
    )
 
16
from storm.store import Store
16
17
from zope.interface import implements
17
18
 
 
19
from canonical.database.sqlbase import SQLBase
 
20
from lp.services.messages.model.message import (
 
21
    Message,
 
22
    MessageChunk,
 
23
    )
18
24
from lp.blueprints.interfaces.specificationmessage import (
19
25
    ISpecificationMessage,
20
26
    ISpecificationMessageSet,
21
27
    )
22
 
from lp.services.database.sqlbase import SQLBase
23
 
from lp.services.messages.model.message import (
24
 
    Message,
25
 
    MessageChunk,
26
 
    )
27
28
 
28
29
 
29
30
class SpecificationMessage(SQLBase):
48
49
        """See ISpecificationMessageSet."""
49
50
        msg = Message(
50
51
            owner=owner, rfc822msgid=make_msgid('blueprint'), subject=subject)
51
 
        MessageChunk(message=msg, content=content, sequence=1)
52
 
        return SpecificationMessage(specification=spec, message=msg)
 
52
        chunk = MessageChunk(message=msg, content=content, sequence=1)
 
53
        specmsg = SpecificationMessage(specification=spec, message=msg)
 
54
        return specmsg
53
55
 
54
56
    def get(self, specmessageid):
55
57
        """See ISpecificationMessageSet."""