Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set url to null instead of https when it is null #5804

Merged
merged 7 commits into from
Dec 2, 2020
Merged

fix: set url to null instead of https when it is null #5804

merged 7 commits into from
Dec 2, 2020

Conversation

maze-runnar
Copy link
Contributor

@maze-runnar maze-runnar commented Nov 28, 2020

Fixes #5779

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Nov 28, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/h8k53osbs
✅ Preview: https://open-event-frontend-git-link-problem.eventyay.vercel.app

@maze-runnar
Copy link
Contributor Author

@iamareebjamal how to allow null in an URL field on the server side?

@codecov
Copy link

codecov bot commented Nov 28, 2020

Codecov Report

Merging #5804 (c3c3b5b) into development (6924ac0) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5804      +/-   ##
===============================================
- Coverage        23.45%   23.39%   -0.06%     
===============================================
  Files              512      513       +1     
  Lines             5445     5479      +34     
  Branches            63       65       +2     
===============================================
+ Hits              1277     1282       +5     
- Misses            4152     4180      +28     
- Partials            16       17       +1     
Impacted Files Coverage Δ
app/components/widgets/forms/link-field.ts 60.00% <0.00%> (-5.22%) ⬇️
app/helpers/general-date.js 66.66% <0.00%> (-33.34%) ⬇️
app/components/public/session-item.js 18.18% <0.00%> (-1.82%) ⬇️
app/controllers/public/index.js 6.25% <0.00%> (-0.10%) ⬇️
app/routes/create.js 100.00% <0.00%> (ø)
app/components/public/call-for-speakers.js 0.00% <0.00%> (ø)
app/components/public/stream/video-stream.ts 4.00% <0.00%> (ø)
app/controllers/events/view/sessions/list.js 0.00% <0.00%> (ø)
app/controllers/events/view/videoroom/list.js 0.00% <0.00%> (ø)
app/helpers/header-date.js
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6924ac0...c3c3b5b. Read the comment docs.

@maze-runnar maze-runnar changed the title wip: set url to null instead of https when it is null fix: set url to null instead of https when it is null Nov 28, 2020
@@ -63,7 +63,11 @@ export default class LinkField extends Component<Args> {
setValue(event: { target: HTMLInputElement }): void {
const text = event.target.value;
this.value = this.fixValue(text);
this.args.onChange(this.finalValue);
if (this.value) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.value ? this.finalValue : this

Copy link
Contributor Author

@maze-runnar maze-runnar Nov 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is showing

Type 'this' is not assignable to type 'string'.
  Type 'LinkField' is not assignable to type 'string'.

@iamareebjamal iamareebjamal merged commit f17e24c into fossasia:development Dec 2, 2020
@maze-runnar maze-runnar deleted the link-problem branch December 13, 2020 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wizard Step 1: Deleting Webinar URL results in error "not valid URL"
2 participants