Skip to content
Snippets Groups Projects
Commit 3dc940ae authored by konykon's avatar konykon
Browse files

Remove duplicate update

parent d20aa015
No related branches found
No related tags found
2 merge requests!213[REL] Release sprint 25/09/23,!212Feat/adjust landing api
Pipeline #53495 passed
......@@ -137,7 +137,6 @@ class LandingPage(models.Model):
def action_landing_page_status(self):
for record in self:
new_status = "draft" if record.status == "publish" else "publish"
self.update_wordpress()
record.write({"status": new_status})
def update_wordpress(self):
......@@ -152,7 +151,6 @@ class LandingPage(models.Model):
auth = Authenticate(baseurl, username, password).authenticate()
token = "Bearer %s" % auth["token"]
landing_page_data = record.to_dict()
landing_page_data["landing"]["status"] = new_status
LandingPageResource(token, baseurl, record.wp_landing_page_id).update(
landing_page_data
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment