diff options
| author | Sleepsonthefloor <sleepsonthefloor@gmail.com> | 2010-08-15 13:36:01 -0700 |
|---|---|---|
| committer | Sleepsonthefloor <sleepsonthefloor@gmail.com> | 2010-08-15 13:36:01 -0700 |
| commit | 665ef27e95d89c518154bfc6b2d9a53929dfeaef (patch) | |
| tree | 4a631e3e0ee89de1357cf381c6ba239eeadf703c | |
| parent | 90a403c04d561179e6b1113a9b994353c14ee965 (diff) | |
| download | nova-665ef27e95d89c518154bfc6b2d9a53929dfeaef.tar.gz nova-665ef27e95d89c518154bfc6b2d9a53929dfeaef.tar.xz nova-665ef27e95d89c518154bfc6b2d9a53929dfeaef.zip | |
add refresh on model
| -rw-r--r-- | nova/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/models.py b/nova/models.py index 9cbebca73..561a722fc 100644 --- a/nova/models.py +++ b/nova/models.py @@ -53,6 +53,10 @@ class NovaBase(object): session.delete(self) session.flush() + def refresh(self): + session = NovaBase.get_session() + session.refresh(self) + class Image(Base, NovaBase): __tablename__ = 'images' user_id = Column(String)#, ForeignKey('users.id'), nullable=False) |
