id_ = self.params.get_int_or_none('id')
c = Condition.by_id(self.conn, id_, create=True)
ps = Process.all(self.conn)
- return {'condition': c,
+ return {'condition': c, 'is_new': c.id_ is None,
'enabled_processes': [p for p in ps if c in p.conditions],
'disabled_processes': [p for p in ps if c in p.blockers],
'enabling_processes': [p for p in ps if c in p.enables],
if title_64:
title = b64decode(title_64.encode()).decode()
process.title.set(title)
- return {'process': process,
+ return {'process': process, 'is_new': process.id_ is None,
'steps': process.get_steps(self.conn),
'owners': process.used_as_step_by(self.conn),
'n_todos': len(Todo.by_process_id(self.conn, process.id_)),