Skip to content

Commit 9ea0b5e

Browse files
committed
[app-builder] bugfix: inherit guest setting every time app published
1 parent f218832 commit 9ea0b5e

File tree

1 file changed

+6
-0
lines changed
  • app-builder/plugins/aipp-plugin/src/main/java/modelengine/fit/jober/aipp/domains/appversion

1 file changed

+6
-0
lines changed

app-builder/plugins/aipp-plugin/src/main/java/modelengine/fit/jober/aipp/domains/appversion/AppVersion.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public class AppVersion {
150150
private static final Logger LOGGER = Logger.get(AppVersion.class);
151151
private static final String PUBLISH_UPDATE_DESCRIPTION_KEY = "publishedDescription";
152152
private static final String PUBLISH_UPDATE_LOG_KEY = "publishedUpdateLog";
153+
private static final String ALLOW_GUEST = "allow_guest";
153154
private static final int RETRY_PATH_GENERATION_TIMES = 3;
154155
private static final int PATH_LENGTH = 16;
155156
private static final String VERSION_FORMAT = "{0}.{1}.{2}";
@@ -748,11 +749,16 @@ public void cloneVersion(AppBuilderAppCreateDto dto, String version, String type
748749
this.getFormProperties().forEach(p -> p.setAppId(newAppId));
749750

750751
if (Objects.nonNull(dto)) {
752+
Boolean allowGuest = false;
753+
if (this.attributes.containsKey(ALLOW_GUEST)) {
754+
allowGuest = ObjectUtils.cast(this.attributes.get(ALLOW_GUEST));
755+
}
751756
this.attributes.clear();
752757
this.attributes.put("description", dto.getDescription());
753758
this.attributes.put("icon", dto.getIcon());
754759
this.attributes.put("greeting", dto.getGreeting());
755760
this.attributes.put("app_type", dto.getAppType());
761+
this.attributes.put(ALLOW_GUEST, allowGuest);
756762
if (StringUtils.isNotBlank(dto.getStoreId())) {
757763
this.attributes.put("store_id", dto.getStoreId());
758764
this.data.setUniqueName(dto.getStoreId());

0 commit comments

Comments
 (0)