Commit 42144eac authored by Dr.李's avatar Dr.李

fixed

parent 319fff13
......@@ -46,7 +46,9 @@ class Portfolio(object):
try:
return self.allocations[code]
except KeyError:
return Allocation(code, 0, 0, 0)
allocation = Allocation(code, 0, 0, 0)
self.allocations[code] = allocation
return allocation
def __repr__(self):
return "Portfolio(name={0}, allocations={1})".format(self.name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment