]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/admin.py
Removed unnecessary check for --prepare-database flag
[nominatim.git] / nominatim / tools / admin.py
index f27d9bbccca8504c39b75de2e0c92656fad439d0..c37d0811ff84b0ebb7276c4b90293f8bf71369d6 100644 (file)
@@ -90,12 +90,9 @@ def analyse_indexing(config: Configuration, osm_id: Optional[str] = None,
             print(msg)
 
 
-def clean_deleted_relations(config: Configuration, age: Optional[str] = None) -> None:
+def clean_deleted_relations(config: Configuration, age: str) -> None:
     """ Clean deleted relations older than a given age
     """
-    if not age:
-        LOG.fatal('No age given to delete relations')
-        raise UsageError('Age parameter not found')
     with connect(config.get_libpq_dsn()) as conn:
         with conn.cursor() as cur:
             try:
@@ -107,4 +104,3 @@ def clean_deleted_relations(config: Configuration, age: Optional[str] = None) ->
             except DataError as exc:
                 raise UsageError('Invalid PostgreSQL time interval format') from exc
         conn.commit()
-            
\ No newline at end of file