This commit is contained in:
Trever Fischer
2012-11-18 09:21:16 -05:00
parent f9340c7582
commit 8ef29f3358

View File

@@ -15,6 +15,10 @@ class Item(models.Model):
@classmethod
def get(cls, material, damage=0, data=0):
if damage is None:
damage = 0
if data is None:
data = 0
return cls.objects.get_or_create(material=material, damage=damage,
data=data)[0]