mirror of
https://github.com/ai-robots-txt/ai.robots.txt.git
synced 2026-09-03 14:54:03 +02:00
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:
parent
78fd7b49d8
commit
8dd8e6c4e4
1 changed files with 9 additions and 4 deletions
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue