diff --git a/facebook/arangodb.py b/facebook/arangodb.py index 12b82e2..1076c6b 100644 --- a/facebook/arangodb.py +++ b/facebook/arangodb.py @@ -45,15 +45,16 @@ def write_report(users, pictures): }) -def get_profile(): - """ Hämtar profil om det inte gjorts förut """ +def get_profile(created=True): + """ Hämtar profil från profiles """ cursor = db.aql.execute( """ FOR doc IN profiles FILTER doc.in_use == false - FILTER doc.created == true + FILTER doc.created == @created RETURN doc - """ + """, + bind_vars={'created': created} ) return cursor.next()