robots.py: possibly ruin the whole purpose of consolodate

Replace an old non-default value with a new non-default value, so updates happen.
This commit is contained in:
guest20 2026-06-17 13:00:15 +02:00 committed by GitHub
commit 8dd8e6c4e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,11 +90,16 @@ def updated_robots_json(soup):
if field not in existing_content[name]:
return value
# Unclear value
if (
existing_content[name][field] in default_values
and value not in default_values
):
if ( existing_content[name][field] in default_values
and value not in default_values ):
return value
# Replace an old non-default value with a new non-default value:
# (you know, so updates happen)
if (existing_content[name][field] not in default_values
and value not in default_values ):
return value
# Existing value
return existing_content[name][field]