Skip to content

Commit

Permalink
chore: fixed linters
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Aug 12, 2024
1 parent 703fafd commit 0335b3b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pages/BatchForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ import MultiSelect from '@/components/Controls/MultiSelect.vue'
import { useRouter } from 'vue-router'
import { getFileSize, showToast } from '../utils'
import { X, FileText } from 'lucide-vue-next'
import { capture } from "@/telemetry"
import { capture } from '@/telemetry'
const router = useRouter()
const user = inject('$user')
Expand Down Expand Up @@ -276,7 +276,7 @@ onMounted(() => {
if (props.batchName != 'new') {
batchDetail.reload()
} else {
capture("batch_form_opened")
capture('batch_form_opened')
}
window.addEventListener('keydown', keyboardShortcut)
})
Expand Down Expand Up @@ -380,7 +380,7 @@ const createNewBatch = () => {
{},
{
onSuccess(data) {
capture("batch_created")
capture('batch_created')
router.push({
name: 'BatchDetail',
params: {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/CourseForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ import { FileText, X } from 'lucide-vue-next'
import { useRouter } from 'vue-router'
import CourseOutline from '@/components/CourseOutline.vue'
import MultiSelect from '@/components/Controls/MultiSelect.vue'
import { capture } from "@/telemetry";
import { capture } from '@/telemetry'
const user = inject('$user')
const newTag = ref('')
Expand Down Expand Up @@ -270,7 +270,7 @@ onMounted(() => {
if (props.courseName !== 'new') {
courseResource.reload()
} else {
capture("course_form_opened")
capture('course_form_opened')
}
window.addEventListener('keydown', keyboardShortcut)
})
Expand Down Expand Up @@ -391,7 +391,7 @@ const submitCourse = () => {
} else {
courseCreationResource.submit(course, {
onSuccess(data) {
capture("course_created")
capture('course_created')
showToast('Success', 'Course created successfully', 'check')
router.push({
name: 'CourseForm',
Expand Down
20 changes: 11 additions & 9 deletions lms/lms/telemetry.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import frappe


@frappe.whitelist()
def is_enabled():
return bool(
frappe.get_system_settings("enable_telemetry")
and frappe.conf.get("posthog_host")
and frappe.conf.get("posthog_project_id")
)
return bool(
frappe.get_system_settings("enable_telemetry")
and frappe.conf.get("posthog_host")
and frappe.conf.get("posthog_project_id")
)


@frappe.whitelist()
def get_credentials():
return {
"project_id": frappe.conf.get("posthog_project_id"),
"telemetry_host": frappe.conf.get("posthog_host"),
}
return {
"project_id": frappe.conf.get("posthog_project_id"),
"telemetry_host": frappe.conf.get("posthog_host"),
}

0 comments on commit 0335b3b

Please sign in to comment.