Skip to content

Commit

Permalink
Use a method-call so ensure database is actually loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdekoning committed Aug 23, 2019
1 parent d83af12 commit ae1a54e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activity_browser/app/bwutils/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ def index(self):
def get_locations(self, db_name: str) -> set:
""" Returns a set of locations for the given database name.
"""
data = self.dataframe[self.dataframe["database"] == db_name]["location"].unique()
data = self.get_database_metadata(db_name)["location"].unique()
return set(data[data != ""])

def get_units(self, db_name: str) -> set:
""" Returns a set of units for the given database name.
"""
data = self.dataframe[self.dataframe["database"] == db_name]["unit"].unique()
data = self.get_database_metadata(db_name)["unit"].unique()
return set(data[data != ""])

def print_convenience_information(self, db_name: str) -> None:
Expand Down

0 comments on commit ae1a54e

Please sign in to comment.