Andrey Volkov daad6c26ec Fix host mapping saving
Changes return ability to use HostMapping.save method,
it was broken.

It fixes two issues:
- HostMapping._save_in_db got unexpected parameter
  (self.host instead of self object from the save call).
  It's clear.

- "sqlalchemy.orm.exc.DetachedInstanceError: Parent instance
  <HostMapping> is not bound to a Session;"
  while trying to get the cell_mapping attribute on saved HostMapping
  instance.

  As HostMapping cannot be without cell_mapping, solution is to load
  cell_mapping attribute just after getting it from DB.
  To be consistent I used the code from _create_in_db method.

Closes-bug: 1595587
Change-Id: Ia2e427f5bd4ab43d1c273de72ef7bb8c01d8d1af
2016-07-15 08:49:45 +03:00
..
2015-10-30 00:22:23 +00:00
2016-07-04 11:23:52 +05:30
2016-06-08 11:32:53 +02:00
2016-04-01 08:46:54 -07:00
2016-06-17 11:27:29 -04:00
2016-01-11 16:38:06 +00:00
2016-04-04 18:22:59 +00:00
2016-07-04 11:23:52 +05:30
2016-07-15 08:49:45 +03:00
2016-06-13 06:41:08 +00:00
2016-04-06 16:37:22 +03:00
2015-11-10 15:56:14 +00:00
2015-08-23 18:45:38 +02:00