fixes #7: improve collection selector
This commit is contained in:
والد
4f77b3953d
کامیت
4e0228753e
2فایلهای تغییر یافته به همراه13 افزوده شده و 2 حذف شده
14
ibt2.py
14
ibt2.py
|
@ -330,7 +330,11 @@ class DaysHandler(BaseHandler):
|
|||
now = datetime.datetime.now()
|
||||
data['updated_by'] = self.current_user_info.get('_id')
|
||||
data['updated_at'] = now
|
||||
merged, doc = self.db.update('days', self.arguments, data)
|
||||
day = (data.get('day') or '').strip()
|
||||
if not day:
|
||||
return self.build_error(status=404, message='unable to access the resource')
|
||||
data['day'] = day
|
||||
merged, doc = self.db.update('days', {'day': day}, data)
|
||||
self.write(doc)
|
||||
|
||||
|
||||
|
@ -342,7 +346,13 @@ class GroupsHandler(BaseHandler):
|
|||
now = datetime.datetime.now()
|
||||
data['updated_by'] = self.current_user_info.get('_id')
|
||||
data['updated_at'] = now
|
||||
merged, doc = self.db.update('groups', self.arguments, data)
|
||||
day = (data.get('day') or '').strip()
|
||||
group = (data.get('group') or '').strip()
|
||||
if not (day and group):
|
||||
return self.build_error(status=404, message='unable to access the resource')
|
||||
data['day'] = day
|
||||
data['group'] = group
|
||||
merged, doc = self.db.update('groups', {'day': day, 'group': group}, data)
|
||||
self.write(doc)
|
||||
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@ export default {
|
|||
this.$refs.dialogObj.show({text: 'unable to edit day notes'});
|
||||
}).then((json) => {
|
||||
this.day.notes = json.notes;
|
||||
this.reload();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
بارگذاری…
مرجع در شماره جدید