Merge pull request #6565 from saurabh6790/warehouse_group_account_rename_fix

[fix] warehouse account rename fix #6526
This commit is contained in:
Nabin Hait 2016-10-07 14:11:14 +05:30 committed by GitHub
commit eb08d632b3

View File

@ -150,7 +150,10 @@ class Warehouse(NestedSet):
return new_warehouse
def rename_account_for(self, olddn, newdn, merge):
old_account = self.get_account(olddn)
if self.is_group:
old_account = self.get_account()
else:
old_account = self.get_account(olddn)
if old_account:
new_account = None