Skip to content

Commit

Permalink
Merge pull request #541 from Badsender-com/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
medamineziraoui authored Nov 28, 2021
2 parents fe3ae95 + 7ee4e2d commit ef3f017
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/server/group/group.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const GroupSchema = Schema(
// from mongoose doc:
// violating the constraint returns an E11000 error from MongoDB when saving, not a Mongoose validation error.
unique: true,
set: normalizeString,
set: trimString,
},
status: {
type: String,
Expand Down
4 changes: 2 additions & 2 deletions packages/server/template/template.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { Schema } = require('mongoose');
const { ObjectId } = Schema.Types;
const mongooseHidden = require('mongoose-hidden')();

const { normalizeString } = require('../utils/model');
const { trimString } = require('../utils/model');
const { GroupModel } = require('../constant/model.names');

/**
Expand Down Expand Up @@ -43,7 +43,7 @@ const TemplateSchema = Schema(
type: String,
unique: true,
required: [true, 'name is required'],
set: normalizeString,
set: trimString,
},
description: {
type: String,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/group/form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default {
:label="$t('global.name')"
name="name"
required
:disabled="disabled"
:disabled="disabled || isGroupAdmin"
:error-messages="requiredErrors(`name`)"
@input="$v.group.name.$touch()"
@blur="$v.group.name.$touch()"
Expand Down

0 comments on commit ef3f017

Please sign in to comment.