RSVP fromNotice now throws NoResultException
This commit is contained in:
parent
e32178d3ce
commit
a9676f5b2b
|
@ -226,7 +226,12 @@ class RSVP extends Managed_DataObject
|
||||||
|
|
||||||
static function fromNotice(Notice $notice)
|
static function fromNotice(Notice $notice)
|
||||||
{
|
{
|
||||||
return RSVP::getKV('uri', $notice->uri);
|
$rsvp = new RSVP();
|
||||||
|
$rsvp->uri = $notice->uri;
|
||||||
|
if (!$rsvp->find(true)) {
|
||||||
|
throw new NoResultException($rsvp);
|
||||||
|
}
|
||||||
|
return $rsvp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function forEvent(Happening $event)
|
static function forEvent(Happening $event)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user