﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	parents
984	ActivityIntermediator bits	Elrond		"While looking at ActivityIntermediator, I noticed some bits.

The .set method could probably be rewritten a bit:

{{{
# We need to flush so that self.id is populated
self.type = key
Session.flush()

# First set self as activity
obj.activity = self.id
Session.commit()
}}}

And instead of checking values in {{{.save}}} use a validator.
See http://docs.sqlalchemy.org/en/latest/orm/mapper_config.html#simple-validators

{{{
@validates('type')
def validate_type(self, key, value):
    assert value in self.TYPES
    return value
}}}"	enhancement	closed	minor	0.8.0	programming	fixed			
