HOTFIX: Crashing server on description == 230 chars

This commit is contained in:
Andreas Mieke 2015-09-28 21:48:11 +02:00
parent 898fee21b8
commit df02ebf00d

View file

@ -148,7 +148,7 @@ func GetLEpisode(c *gin.Context) {
database.Db.Model(&LP).Related(&AT)
var DEP []gin.H
for _, EP := range EPs {
if len(EP.Descr.String) >= 230 {
if len(EP.Descr.String) > 230 {
ints := []rune(EP.Descr.String)
EP.Descr.String = string(ints[:230]) + "…"
}
@ -169,7 +169,7 @@ func GetLEpisode(c *gin.Context) {
database.Db.Model(&LP).Related(&AT)
var DEP []gin.H
for _, EP := range EPs {
if len(EP.Descr.String) >= 230 {
if len(EP.Descr.String) > 230 {
ints := []rune(EP.Descr.String)
EP.Descr.String = string(ints[:230]) + "…"
}