Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit use-case of default moderation set to draft #3154

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

thierrydallacroce
Copy link
Contributor

@thierrydallacroce thierrydallacroce commented Jul 5, 2020

Revisiting my previous PR #3148 which passed testing prior to being merged but, once failed afterwards (bc6a32b) and was reverted (3cc832e).

As expected it's passing again this time, but a bit reluctant to proceed again, unsure if I missed something in my code, or whether it was a fluke in CI. Any thoughts?

@thierrydallacroce
Copy link
Contributor Author

Any thoughts on trying this approach?

     $this->assertSchema();
 
-    $node = $this->getNodeLatestRevision($uuid);
+    $defModState = $this->getDefaultModerationState();
+    if ($defModState == 'draft') {
+      $node = $this->getNodeLatestRevision($uuid);
+    }
+    elseif ($defModState == 'published') {
+      $node = $this->getNodePublishedRevision($uuid);
+    }
+
     if ($node) {

@thierrydallacroce thierrydallacroce force-pushed the revisit-default-moderation-draft branch 2 times, most recently from 549e6a9 to 59bb7ce Compare July 10, 2020 14:37
@thierrydallacroce thierrydallacroce marked this pull request as ready for review July 12, 2020 02:49
@thierrydallacroce thierrydallacroce merged commit b22a1cb into 2.x Jul 13, 2020
@thierrydallacroce thierrydallacroce deleted the revisit-default-moderation-draft branch July 13, 2020 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant