Skip to content

Commit

Permalink
Merge pull request #1483 from wordpress-mobile/issue-11040-slug-not-s…
Browse files Browse the repository at this point in the history
…et-on-self-hosted-sites

Fix slug not set on self hosted sites
  • Loading branch information
malinajirka authored Jan 22, 2020
2 parents 483f9e6 + 5cec435 commit f18e8d7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ private static PostModel postResponseObjectToPostModel(@NonNull Map postObject,
post.setCustomFields(jsonCustomFieldsArray.toString());

post.setExcerpt(MapUtils.getMapStr(postMap, "post_excerpt"));
post.setSlug(MapUtils.getMapStr(postMap, "post_name"));

post.setPassword(MapUtils.getMapStr(postMap, "post_password"));
post.setStatus(MapUtils.getMapStr(postMap, "post_status"));
Expand Down Expand Up @@ -562,6 +563,7 @@ private static Map<String, Object> postModelToContentStruct(PostModel post) {
}

contentStruct.put("post_excerpt", post.getExcerpt());
contentStruct.put("post_name", post.getSlug());
contentStruct.put("post_status", post.getStatus());

// Geolocation
Expand Down

0 comments on commit f18e8d7

Please sign in to comment.