set version default value to zero
This commit is contained in:
parent
df81f38ad6
commit
cc5dc4aa43
2 changed files with 3 additions and 2 deletions
|
@ -176,10 +176,11 @@ class CollectionAttributes {
|
|||
final String encryptedPath;
|
||||
final String pathDecryptionNonce;
|
||||
final int version;
|
||||
|
||||
CollectionAttributes({
|
||||
this.encryptedPath,
|
||||
this.pathDecryptionNonce,
|
||||
this.version,
|
||||
this.version = 0,
|
||||
});
|
||||
|
||||
CollectionAttributes copyWith({
|
||||
|
|
|
@ -324,7 +324,7 @@ class CollectionsService {
|
|||
}
|
||||
|
||||
String decryptCollectionPath(Collection collection) {
|
||||
final key = collection.attributes.version != null
|
||||
final key = collection.attributes.version == 0
|
||||
? getCollectionKey(collection.id)
|
||||
: _config.getKey();
|
||||
return utf8.decode(CryptoUtil.decryptSync(
|
||||
|
|
Loading…
Add table
Reference in a new issue