diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py
index 4d2510cabd37bc1f823b261fa1286ab2b3951c50..784def89b061af292b671ee4e31df1267f849d81 100644
--- a/src/caosdb/common/models.py
+++ b/src/caosdb/common/models.py
@@ -3675,7 +3675,8 @@ class Query():
 
         if unique:
             if len(cresp) > 1 and raise_exception_on_error:
-                raise AmbiguityException("Query '{}' wasn't unique.".format(self.q))
+                raise AmbiguityException(
+                    "Query '{}' wasn't unique.".format(self.q))
             elif len(cresp) == 0 and raise_exception_on_error:
                 ee = EntityDoesNotExistError(
                     "Query '{}' found no results.".format(self.q))
diff --git a/src/caosdb/exceptions.py b/src/caosdb/exceptions.py
index c54a894f184741d2f6555400d0509f4cd145e73e..f837cdd3ab186b03c99181b9163d94ba9088a44b 100644
--- a/src/caosdb/exceptions.py
+++ b/src/caosdb/exceptions.py
@@ -226,7 +226,6 @@ class TransactionError(CaosDBException):
             raise TypeError(
                 "Argument is to be an EntityError or a list of EntityErrors.")
 
-    
     def _repr_reasons(self, indent):
         if self.errors is not None and len(self.errors) > 0:
             ret = "\n" + indent + "    +--| REASONS |--"