Fix migration bug

pull/146/head
johnniang 2019-04-27 00:19:51 +08:00
parent 5adeed87cb
commit b61d24d7bd
3 changed files with 2 additions and 3 deletions

View File

@ -92,7 +92,6 @@ public class Attachment extends BaseEntity {
@Override
public void prePersist() {
super.prePersist();
id = null;
if (fileKey == null) {
fileKey = "";

View File

@ -440,7 +440,7 @@ public class RecoveryServiceImpl implements RecoveryService {
}
// Set location
String attachLocation = attachmentMap.get("attachLocation").toString();
String attachLocation = attachmentMap.getOrDefault("attachLocation", "").toString();
if (StringUtils.equalsIgnoreCase(attachLocation, "qiniu")) {
attachment.setType(AttachmentType.QNYUN);
} else if (StringUtils.equalsIgnoreCase(attachLocation, "upyun")) {

View File

@ -1,7 +1,7 @@
<div class="page-top animated fadeInDown">
<div class="nav">
<@menuTag method="list">
<#list menus?sort_by('sort') as menu>
<#list menus?sort_by('priority') as menu>
<li>
<a href="${menu.url}" target="${menu.target!}">${menu.name} </a>
</li>