1. Chris Mutel
  2. brightway2-data

Commits

Chris Mutel  committed 599279c

Fix bug with mapping dying when first written to

  • Participants
  • Parent commits 8753b22
  • Branches default

Comments (0)

Files changed (1)

File bw2data/meta.py

View file
  • Ignore whitespace
             * *keys* (list): The keys to add.
 
         """
-        index = max(self.data.values())
+        index = max(self.data.values()) if self.data else 0
         for i, key in enumerate(keys):
             if key not in self.data:
                 self.data[key] = index + i + 1