Skip to content

Commit

Permalink
feat: add qbd di flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrishabh17 committed Oct 14, 2024
1 parent 590dd48 commit 96fb3f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/orgs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ class Org(models.Model):
allow_travelperk = models.BooleanField(default=True, help_text='Allow Travelperk')
allow_gusto = models.BooleanField(default=False, help_text='Allow Gusto')
allow_dynamics = models.BooleanField(default=False, help_text='Allow Dynamics')
allow_qbd_direct_integration = models.BooleanField(default=False, help_text='Allow QBD Direct Integration')
created_at = models.DateTimeField(auto_now_add=True, help_text='Created at datetime')
updated_at = models.DateTimeField(auto_now=True, help_text='Updated at datetime')
updated_at = models.DateTimeField(auto_now=True, help_text='Updated at datetime')

class Meta:
db_table = 'orgs'
Expand Down
3 changes: 2 additions & 1 deletion apps/orgs/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def update(self, instance, validated):
else:
auth_tokens = AuthToken.objects.get(user__user_id=self.context['request'].user)
cluster_domain = get_cluster_domain(auth_tokens.refresh_token)
org = Org.objects.create(name=org_name, fyle_org_id=org_id, cluster_domain=cluster_domain)
allow_qbd_direct_integration = validated.get('allow_qbd_direct_integration', False)
org = Org.objects.create(name=org_name, fyle_org_id=org_id, cluster_domain=cluster_domain, allow_qbd_direct_integration=allow_qbd_direct_integration)
org.user.add(User.objects.get(user_id=self.context['request'].user))

FyleCredential.objects.update_or_create(
Expand Down

0 comments on commit 96fb3f4

Please sign in to comment.