Skip to content

Commit

Permalink
updated crawling checks
Browse files Browse the repository at this point in the history
  • Loading branch information
seowings committed Oct 14, 2023
1 parent e4b72da commit 4432bf9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/staticwordpress/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,12 @@ def is_valid(self) -> bool:
)

def has_github(self) -> bool:
return self["github"]["token"] != "" or self["github"]["repository"] != ""
return self["github"]["token"] != "" and self["github"]["repository"] != ""

def has_wordpress(self) -> bool:
return self["wordpress"]["api-token"] != "" or self["wordpress"]["user"] != ""
return self["source"]["type"] == SOURCE.CRAWL or (
self["wordpress"]["api-token"] != "" and self["wordpress"]["user"] != ""
)

def can_crawl(self) -> bool:
return all(
Expand Down

0 comments on commit 4432bf9

Please sign in to comment.