Remove pk from Caption constructor, to resolve deserialization exception when pk sent by api is a string

This commit is contained in:
Ammar Githam 2021-05-23 12:09:54 +09:00
parent 027d2c634a
commit 0986f2fb71
2 changed files with 3 additions and 2 deletions

View File

@ -2,4 +2,6 @@ package awais.instagrabber.repositories.responses
import java.io.Serializable import java.io.Serializable
data class Caption(var pk: Long = 0, val userId: Long, var text: String) : Serializable data class Caption(val userId: Long, var text: String?) : Serializable {
var pk: Long = 0
}

View File

@ -781,7 +781,6 @@ public final class ResponseBodyUtils {
); );
} }
final Caption caption = new Caption( final Caption caption = new Caption(
0,
userId, userId,
captionText != null ? captionText : "" captionText != null ? captionText : ""
); );