Skip to content

Commit

Permalink
优化更新策略
Browse files Browse the repository at this point in the history
  • Loading branch information
mouday committed Sep 17, 2023
1 parent a1d7cd3 commit 1d80eb2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions domain_admin/api/domain_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ def update_domain_by_id():

after_domain_row = DomainModel.get_by_id(domain_id)

# 域名和端口没改变,就不更新
if before_domain_row.domain == after_domain_row.domain and before_domain_row.port == after_domain_row.port:
# 域名、端口、SSL加密方式没改变,就不更新
if before_domain_row.domain == after_domain_row.domain \
and before_domain_row.port == after_domain_row.port \
and before_domain_row.ssl_type == after_domain_row.ssl_type:
pass
else:
if after_domain_row.auto_update:
Expand Down Expand Up @@ -373,7 +375,6 @@ def export_domain_file():
order_prop = request.json.get('order_prop') or 'expire_days'
order_type = request.json.get('order_type') or 'ascending'


params = {
'keyword': keyword,
'group_id': group_id,
Expand Down

0 comments on commit 1d80eb2

Please sign in to comment.