mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Do not send wrong value for crypt_passwords option.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
/>
|
||||
<v-chip
|
||||
v-for="(_recipient, index) in recipients"
|
||||
:key="index"
|
||||
:key="_recipient"
|
||||
class="mr-2 mt-2"
|
||||
closable
|
||||
@click:close="removeRecipient(index)"
|
||||
@@ -29,17 +29,13 @@
|
||||
<script setup lang="js">
|
||||
import EmailField from '@/components/tools/EmailField'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const { $gettext } = useGettext()
|
||||
const emit = defineEmits(['update:model-value'])
|
||||
const props = defineProps({
|
||||
modelValue: { type: Array, default: () => [] },
|
||||
})
|
||||
|
||||
const recipients = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value) => emit('update:model-value', value),
|
||||
const recipients = defineModel({
|
||||
type: Array,
|
||||
default: () => [],
|
||||
})
|
||||
|
||||
const recipient = ref('')
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-toolbar flat>
|
||||
<v-toolbar-title>{{ $gettext('Edit alias') }}</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<AliasEditForm :alias="alias" />
|
||||
<AliasEditForm />
|
||||
</template>
|
||||
|
||||
<script setup lang="js">
|
||||
|
||||
@@ -130,7 +130,9 @@ function exportIdentities() {
|
||||
}
|
||||
|
||||
function importIdentities(data, form) {
|
||||
data.append('crypt_passwords', form.crypt_passwords)
|
||||
if (form.crypt_passwords !== undefined && form.crypt_passwords !== null) {
|
||||
data.append('crypt_passwords', form.crypt_passwords)
|
||||
}
|
||||
importContent(identitiesApi, data, importForm, $gettext)
|
||||
}
|
||||
|
||||
|
||||
@@ -745,7 +745,7 @@ class CSVImportSerializer(serializers.Serializer):
|
||||
class CSVIdentityImportSerializer(CSVImportSerializer):
|
||||
"""Custom serializer for identity import."""
|
||||
|
||||
crypt_passwords = serializers.BooleanField()
|
||||
crypt_passwords = serializers.BooleanField(default=False)
|
||||
|
||||
|
||||
class AlarmSerializer(serializers.ModelSerializer):
|
||||
|
||||
Reference in New Issue
Block a user